Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,8 +1,14 @@
|
|
1 |
import gradio as gr
|
2 |
|
3 |
-
def greet(name):
|
4 |
-
return "Hello
|
5 |
|
6 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
|
8 |
iface.launch()
|
|
|
1 |
import gradio as gr
|
2 |
|
3 |
+
def greet(name, age, city):
|
4 |
+
return f"Hello {name}! You are {age} years old and you live in {city}."
|
5 |
|
6 |
+
inputs = [
|
7 |
+
gr.inputs.Textbox(label="Name"),
|
8 |
+
gr.inputs.Textbox(label="Age", type="number"),
|
9 |
+
gr.inputs.Textbox(label="City")
|
10 |
+
]
|
11 |
+
|
12 |
+
iface = gr.Interface(fn=greet, inputs=inputs, outputs="text", title="Greeting App", description="Enter your name, age, and city to get a greeting!")
|
13 |
|
14 |
iface.launch()
|