MaxMilan1 commited on
Commit
7d79b00
·
1 Parent(s): 2457f9c
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -12,8 +12,8 @@ pipe.to("cuda")
12
  @spaces.GPU
13
  def generate_image(prompt):
14
 
15
- images = pipe(prompt)
16
- return images[0]
17
 
18
  _TITLE = "Shoe Generator"
19
  with gr.Blocks(_TITLE) as ShoeGen:
@@ -22,7 +22,8 @@ with gr.Blocks(_TITLE) as ShoeGen:
22
  prompt = gr.Textbox(label="Enter a prompt")
23
  button_gen = gr.Button("Generate Image")
24
  with gr.Column():
25
- output = gr.Image(label="Generated Image")
 
26
 
27
  button_gen.click(generate_image, inputs=[prompt], outputs=output)
28
 
 
12
  @spaces.GPU
13
  def generate_image(prompt):
14
 
15
+ images = pipe(prompt).images
16
+ return images
17
 
18
  _TITLE = "Shoe Generator"
19
  with gr.Blocks(_TITLE) as ShoeGen:
 
22
  prompt = gr.Textbox(label="Enter a prompt")
23
  button_gen = gr.Button("Generate Image")
24
  with gr.Column():
25
+ # show images
26
+ output = gr.Image("Generated Image", show_download_button=True)
27
 
28
  button_gen.click(generate_image, inputs=[prompt], outputs=output)
29