File size: 559 Bytes
616f9d7
 
93b660b
616f9d7
 
 
 
42fe3b8
 
93b660b
 
 
616f9d7
42fe3b8
 
 
93b660b
616f9d7
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# https://www.gradio.app/guides/quickstart
import gradio as gr

def greet(name, is_morning, temperature):
    salutation = "Good morning" if is_morning else "Good evening"
    greeting = f"{salutation} {name}. It is {temperature} degrees today"
    celsius = (temperature - 32) * 5 / 9
#    return greeting, round(celsius, 2)
    return round(celsius,2)

demo = gr.Interface(
    fn=greet,
    inputs=["text", "checkbox", gr.Slider(0, 100)],
#    outputs=["text", "number"],

    outputs=gr.Textbox(lines=5, max_lines=6, label="Output Text"),
)
demo.launch()