Spaces:
Sleeping
Sleeping
File size: 558 Bytes
616f9d7 d5f2ded 93b660b 876df0a 616f9d7 876df0a 345d5f6 d5f2ded 3f977cd 93b660b d5f2ded 93b660b 5c00f2a 96824b6 93b660b 616f9d7 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
# 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} 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()
|