Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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 |
-
|
23 |
-
|
|
|
24 |
btn = gr.Button("Generate")
|
25 |
-
btn.click(dream, inputs=prompt, outputs=[
|
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 |
|