Janic commited on
Commit
36cbeb5
1 Parent(s): 1edb462

first commit

Browse files
Files changed (2) hide show
  1. app.py +16 -0
  2. requirements.txt +0 -0
app.py ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+
3
+
4
+ def greet(name, is_morning, temperature):
5
+ salutation = "Good morning" if is_morning else "Good evening"
6
+ greeting = f"{salutation}, {name}! It is {temperature} degrees today"
7
+ celsius = (temperature - 32) * 5 / 9
8
+ return greeting, round(celsius)
9
+
10
+
11
+ if __name__ == '__main__':
12
+ demo = gr.Interface(fn=greet,
13
+ inputs=["text", 'checkbox', gr.Slider(0, 100)],
14
+ outputs=["text", "number"],
15
+ live=True)
16
+ demo.launch()
requirements.txt ADDED
File without changes