lampongyuen's picture
Update app.py
3f977cd
raw
history blame
582 Bytes
# 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"
greeting + str(123.4)
celsius = (temperature - 32) * 5 / 9
# return greeting, round(celsius, 2)
return greeting
demo = gr.Interface(
fn=greet,
inputs=["text", "checkbox", gr.Slider(0, 100)],
# outputs=["text", "number"],
outputs=gr.Textbox(lines=5, max_lines=6, label="Greeting message"),
)
demo.launch()