Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -24,15 +24,15 @@ pipe.scheduler = EulerDiscreteScheduler.from_config(pipe.scheduler.config, times
|
|
| 24 |
|
| 25 |
def generate_image(text):
|
| 26 |
|
| 27 |
-
|
| 28 |
|
| 29 |
-
return
|
| 30 |
|
| 31 |
# Create a Gradio interface
|
| 32 |
iface = gr.Interface(
|
| 33 |
fn=generate_image,
|
| 34 |
inputs=gr.Textbox(lines=5, label="Enter a description for the image"),
|
| 35 |
-
outputs="
|
| 36 |
title="Text to Image Generation",
|
| 37 |
description="Enter a text description and get an image.",
|
| 38 |
theme="compact"
|
|
|
|
| 24 |
|
| 25 |
def generate_image(text):
|
| 26 |
|
| 27 |
+
pipe("krishna", num_inference_steps=2, guidance_scale=0).images[0].save("output.png")
|
| 28 |
|
| 29 |
+
return "output.png"
|
| 30 |
|
| 31 |
# Create a Gradio interface
|
| 32 |
iface = gr.Interface(
|
| 33 |
fn=generate_image,
|
| 34 |
inputs=gr.Textbox(lines=5, label="Enter a description for the image"),
|
| 35 |
+
outputs=outputs=gr.outputs.Image(type="filepath", label="Generated Image"),
|
| 36 |
title="Text to Image Generation",
|
| 37 |
description="Enter a text description and get an image.",
|
| 38 |
theme="compact"
|