Add space
Browse files
app.py
CHANGED
@@ -1,17 +1,4 @@
|
|
1 |
import gradio as gr
|
2 |
|
3 |
-
|
4 |
-
food_box = gr.Number(value=10, label="Food Count")
|
5 |
-
status_box = gr.Textbox()
|
6 |
-
def eat(food):
|
7 |
-
if food > 0:
|
8 |
-
return food - 1, "full"
|
9 |
-
else:
|
10 |
-
return 0, "hungry"
|
11 |
-
gr.Button("EAT").click(
|
12 |
-
fn=eat,
|
13 |
-
inputs=food_box,
|
14 |
-
outputs=[food_box, status_box]
|
15 |
-
)
|
16 |
-
|
17 |
demo.launch()
|
|
|
1 |
import gradio as gr
|
2 |
|
3 |
+
demo = gr.load("playgroundai/playground-v2", src="spaces")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
demo.launch()
|