Spaces:
Sleeping
Sleeping
# https://www.gradio.app/guides/quickstart | |
import gradio | |
def greet(name, is_morning, temperature_in_Fahrenheit): | |
salutation = "Good morning" if is_morning else "Good evening" | |
celsius = (temperature_in_Fahrenheit - 32)*5/9 | |
celsius = round(celsius,2) | |
greeting = f"{salutation} {name}. The temperate is {temperature_in_Fahrenheit} Fahrenheit and {celsius} degree Celsius" | |
return greeting | |
demo = gradio.Interface( | |
fn=greet, | |
inputs=["text", "checkbox", gradio.Slider(0, 100)], | |
outputs=gradio.Textbox(label="Greeting message"), | |
) | |
demo.launch() | |