radames commited on
Commit
d33d3f5
·
1 Parent(s): 85f09e9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -12
app.py CHANGED
@@ -7,22 +7,14 @@ import uvicorn
7
  app = FastAPI()
8
 
9
 
10
- @app.on_event("startup")
11
- def print_foo():
12
- print("FOO!!!")
13
-
14
-
15
- def dream(prompt):
16
- return ["static/lion.jpg"] * 2, {}
17
-
18
-
19
  block = gr.Blocks().queue()
20
  with block:
21
  prompt = gr.Text()
22
- gallery = gr.Gallery().style(grid=[2], height="auto")
23
- contains_nfsw = gr.JSON(visible=False)
 
24
  btn = gr.Button("Generate")
25
- btn.click(dream, inputs=prompt, outputs=[gallery, contains_nfsw])
26
 
27
  gradio_app = gr.routes.App.create_app(block)
28
 
 
7
  app = FastAPI()
8
 
9
 
 
 
 
 
 
 
 
 
 
10
  block = gr.Blocks().queue()
11
  with block:
12
  prompt = gr.Text()
13
+ output = gr.Text()
14
+
15
+
16
  btn = gr.Button("Generate")
17
+ btn.click(dream, inputs=[prompt], outputs=[output])
18
 
19
  gradio_app = gr.routes.App.create_app(block)
20