balaramas commited on
Commit
09b4503
·
verified ·
1 Parent(s): b2b249d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -24,15 +24,15 @@ pipe.scheduler = EulerDiscreteScheduler.from_config(pipe.scheduler.config, times
24
 
25
  def generate_image(text):
26
 
27
- image = pipe("krishna", num_inference_steps=2, guidance_scale=0).images[0]
28
 
29
- return image
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="image",
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"