tommy24 commited on
Commit
6475b08
·
1 Parent(s): bf93ff7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -3
app.py CHANGED
@@ -1,8 +1,14 @@
1
  import gradio as gr
2
 
3
- def greet(name):
4
- return "Hello, " + name + "!"
5
 
6
- iface = gr.Interface(fn=greet, inputs="text", outputs="text", title="Greeting App", description="Enter your name and get a greeting!")
 
 
 
 
 
 
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()