freddyaboulton HF staff commited on
Commit
7db2ce9
1 Parent(s): 782de0c
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -11,15 +11,14 @@ def print_foo():
11
  print("FOO!!!")
12
 
13
  def dream(prompt):
14
- return ["images/lion.jpg"] * 2, {}
15
 
16
  block = gr.Blocks().queue()
17
  with block:
18
  prompt = gr.Text()
19
- gallery = gr.Gallery().style(grid=[2], height="auto")
20
- contains_nfsw = gr.JSON(visible=False)
21
  btn = gr.Button("Generate")
22
- btn.click(dream, inputs=prompt, outputs=[gallery, contains_nfsw])
23
 
24
  gradio_app = gr.routes.App.create_app(block)
25
 
 
11
  print("FOO!!!")
12
 
13
  def dream(prompt):
14
+ return "hello world!"
15
 
16
  block = gr.Blocks().queue()
17
  with block:
18
  prompt = gr.Text()
19
+ gallery = gr.Text()
 
20
  btn = gr.Button("Generate")
21
+ btn.click(dream, inputs=prompt, outputs=[gallery])
22
 
23
  gradio_app = gr.routes.App.create_app(block)
24