Amram commited on
Commit
e8dc5fa
·
1 Parent(s): a54754e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -1
app.py CHANGED
@@ -4,4 +4,19 @@ def greet(name):
4
  return "Hello " + name + "!!"
5
 
6
  iface = gr.Interface(fn=greet, inputs="text", outputs="text")
7
- iface.launch()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4
  return "Hello " + name + "!!"
5
 
6
  iface = gr.Interface(fn=greet, inputs="text", outputs="text")
7
+ iface.launch()import gradio as gr
8
+
9
+ def greet(name, is_morning, temperature):
10
+ salutation = "Good morning" if is_morning else "Good evening"
11
+ greeting = f"{salutation} {name}. It is {temperature} degrees today"
12
+ celsius = (temperature - 32) * 5 / 9
13
+ return greeting, round(celsius, 2)
14
+
15
+ demo = gr.Interface(
16
+ fn=greet,
17
+ inputs=["text", "checkbox", gr.Slider(0, 100)],
18
+ outputs=["text", "number"],
19
+ )
20
+ demo.launch()
21
+
22
+