cbensimon HF Staff commited on
Commit
48a26b4
·
1 Parent(s): bf738a2

gr.Gallery()

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -21,13 +21,13 @@ def generate_image(prompt: str, progress=gr.Progress(track_tqdm=True)):
21
  num_inference_steps=28,
22
  generator=generator,
23
  )
24
- return (output.images[0], f'{(datetime.now() - t0).total_seconds():.2f}s')
25
 
26
 
27
  gr.Interface(
28
  fn=generate_image,
29
  inputs=gr.Text(label="Prompt"),
30
- outputs=gr.Image(),
31
  examples=["A cat playing with a ball of yarn"],
32
  cache_examples=False,
33
  ).launch()
 
21
  num_inference_steps=28,
22
  generator=generator,
23
  )
24
+ return [(output.images[0], f'{(datetime.now() - t0).total_seconds():.2f}s')]
25
 
26
 
27
  gr.Interface(
28
  fn=generate_image,
29
  inputs=gr.Text(label="Prompt"),
30
+ outputs=gr.Gallery(),
31
  examples=["A cat playing with a ball of yarn"],
32
  cache_examples=False,
33
  ).launch()