Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -132,28 +132,19 @@ with gr.Blocks() as demo:
|
|
| 132 |
[text_ip, text_prompt, neg_prompt, width_slider, height_slider, ip_scale_slider, strength_slider, guidance_slider, steps_slider],
|
| 133 |
output_image,
|
| 134 |
text_to_image,
|
| 135 |
-
cache_examples=
|
| 136 |
label='Text-to-Image Example'
|
| 137 |
)
|
| 138 |
|
| 139 |
-
gr.Examples(
|
| 140 |
-
[["./images/img1.jpg", "Paris Hilton", "ugly, deformed, nsfw", 1024, 1024, 0.8, 0.7, 7.5, 75]],
|
| 141 |
-
[text_ip, text_prompt, neg_prompt, width_slider, height_slider, ip_scale_slider, strength_slider, guidance_slider, steps_slider],
|
| 142 |
-
output_image,
|
| 143 |
-
text_to_image,
|
| 144 |
-
cache_examples=True,
|
| 145 |
-
label='Text-to-Image Example'
|
| 146 |
-
)
|
| 147 |
-
"""
|
| 148 |
gr.Examples(
|
| 149 |
[["./images/img1.jpg", "./images/tony.jpg", "photo", "ugly, deformed, nsfw", 1024, 1024, 0.8, 0.7, 7.5, 75]],
|
| 150 |
[image_ip, image_image, image_prompt, neg_prompt, width_slider, height_slider, ip_scale_slider, strength_slider, guidance_slider, steps_slider],
|
| 151 |
output_image,
|
| 152 |
image_to_image,
|
| 153 |
-
cache_examples=
|
| 154 |
label='Image-to-Image Example'
|
| 155 |
)
|
| 156 |
-
|
| 157 |
|
| 158 |
text_button.click(text_to_image, inputs=[text_ip, text_prompt, neg_prompt, width_slider, height_slider, ip_scale_slider, strength_slider, guidance_slider, steps_slider], outputs=output_image)
|
| 159 |
image_button.click(image_to_image, inputs=[image_ip, image_image, image_prompt, neg_prompt, width_slider, height_slider, ip_scale_slider, strength_slider, guidance_slider, steps_slider], outputs=output_image)
|
|
|
|
| 132 |
[text_ip, text_prompt, neg_prompt, width_slider, height_slider, ip_scale_slider, strength_slider, guidance_slider, steps_slider],
|
| 133 |
output_image,
|
| 134 |
text_to_image,
|
| 135 |
+
cache_examples=False,
|
| 136 |
label='Text-to-Image Example'
|
| 137 |
)
|
| 138 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 139 |
gr.Examples(
|
| 140 |
[["./images/img1.jpg", "./images/tony.jpg", "photo", "ugly, deformed, nsfw", 1024, 1024, 0.8, 0.7, 7.5, 75]],
|
| 141 |
[image_ip, image_image, image_prompt, neg_prompt, width_slider, height_slider, ip_scale_slider, strength_slider, guidance_slider, steps_slider],
|
| 142 |
output_image,
|
| 143 |
image_to_image,
|
| 144 |
+
cache_examples=False,
|
| 145 |
label='Image-to-Image Example'
|
| 146 |
)
|
| 147 |
+
|
| 148 |
|
| 149 |
text_button.click(text_to_image, inputs=[text_ip, text_prompt, neg_prompt, width_slider, height_slider, ip_scale_slider, strength_slider, guidance_slider, steps_slider], outputs=output_image)
|
| 150 |
image_button.click(image_to_image, inputs=[image_ip, image_image, image_prompt, neg_prompt, width_slider, height_slider, ip_scale_slider, strength_slider, guidance_slider, steps_slider], outputs=output_image)
|