lfernandopg commited on
Commit
1272d13
·
1 Parent(s): 3b852e7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -13
app.py CHANGED
@@ -81,16 +81,16 @@ st.caption('An app to generate images based on text prompts with a :blue[_Stable
81
  prompt = st.text_input('Input the prompt desired')
82
 
83
  if len(prompt) > 0:
84
- st.markdown(f"""
85
- This will show an image using **stable diffusion** of the desired {prompt} entered:
86
- """)
87
- print(prompt)
88
- # Create a spinner to show the image is being generated
89
- with st.spinner('Generating image based on prompt'):
90
- sd = StableDiffusionLoader(prompt)
91
- sd.generate_image_from_prompt(save_location=SAVE_LOCATION)
92
- st.success('Generated stable diffusion model')
93
-
94
- # Open and display the image on the site
95
- image = Image.open(SAVE_LOCATION)
96
- st.image(image)
 
81
  prompt = st.text_input('Input the prompt desired')
82
 
83
  if len(prompt) > 0:
84
+ st.markdown(f"""
85
+ This will show an image using **stable diffusion** of the desired {prompt} entered:
86
+ """)
87
+ print(prompt)
88
+ # Create a spinner to show the image is being generated
89
+ with st.spinner('Generating image based on prompt'):
90
+ sd = StableDiffusionLoader(prompt)
91
+ sd.generate_image_from_prompt(save_location=SAVE_LOCATION)
92
+ st.success('Generated stable diffusion model')
93
+
94
+ # Open and display the image on the site
95
+ image = Image.open(SAVE_LOCATION)
96
+ st.image(image)