lampongyuen's picture
Update app.py
96824b6
raw
history blame
495 Bytes
# https://www.gradio.app/guides/quickstart
import gradio
def greet(name, is_morning, temperature):
salutation = "Good morning" if is_morning else "Good evening"
celsius = (temperature - 32)*5/9
greeting = f"{salutation} {name}. The temperate is {temperature} Fahrenheit and {celsius} degree Celsius"
return greeting
demo = gradio.Interface(
fn=greet,
inputs=["text", "checkbox", gr.Slider(0, 100)],
outputs=gradio.Textbox(label="Greeting message"),
)
demo.launch()