Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -91,11 +91,29 @@ if torch.cuda.is_available():
|
|
91 |
|
92 |
print(image_paths)
|
93 |
return image_paths, seed, download_links
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
94 |
else:
|
95 |
st.warning("CUDA is not available. The demo may not work on CPU.")
|
96 |
|
97 |
-
|
98 |
-
|
99 |
examples = [
|
100 |
"a modern hospital room with advanced medical equipment and a patient resting comfortably",
|
101 |
"a team of surgeons performing a delicate operation using state-of-the-art surgical robots",
|
|
|
91 |
|
92 |
print(image_paths)
|
93 |
return image_paths, seed, download_links
|
94 |
+
|
95 |
+
if run_button:
|
96 |
+
image_paths, seed, download_links = generate(
|
97 |
+
prompt=prompt,
|
98 |
+
negative_prompt=negative_prompt,
|
99 |
+
use_negative_prompt=use_negative_prompt,
|
100 |
+
seed=seed,
|
101 |
+
width=width,
|
102 |
+
height=height,
|
103 |
+
guidance_scale=guidance_scale,
|
104 |
+
randomize_seed=randomize_seed,
|
105 |
+
)
|
106 |
+
|
107 |
+
for image_path in image_paths:
|
108 |
+
st.image(image_path, caption=prompt)
|
109 |
+
|
110 |
+
for download_link in download_links:
|
111 |
+
st.markdown(download_link, unsafe_allow_html=True)
|
112 |
+
|
113 |
+
st.text(f"Seed: {seed}")
|
114 |
else:
|
115 |
st.warning("CUDA is not available. The demo may not work on CPU.")
|
116 |
|
|
|
|
|
117 |
examples = [
|
118 |
"a modern hospital room with advanced medical equipment and a patient resting comfortably",
|
119 |
"a team of surgeons performing a delicate operation using state-of-the-art surgical robots",
|