Spaces:
Runtime error
Runtime error
Commit
·
1272d13
1
Parent(s):
3b852e7
Update app.py
Browse files
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 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
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)
|