Spaces:
Running
Running
Update temperature
Browse files
app.py
CHANGED
@@ -20,7 +20,7 @@ def greet(
|
|
20 |
) -> str:
|
21 |
"""Greet the user with a message and the temperature in Celsius."""
|
22 |
salutation = "Good morning" if is_morning else "Good evening"
|
23 |
-
return f"{salutation} {name}. It is {temperature}
|
24 |
|
25 |
|
26 |
with gr.Blocks() as demo:
|
@@ -40,7 +40,7 @@ with gr.Blocks() as demo:
|
|
40 |
with gr.Row():
|
41 |
with gr.Column():
|
42 |
name_input = gr.Text(label="What is your name?")
|
43 |
-
temperature_input = gr.Slider(
|
44 |
is_morning = gr.Checkbox(label="Is it morning?")
|
45 |
greeting_button = gr.Button("Greet")
|
46 |
with gr.Column():
|
|
|
20 |
) -> str:
|
21 |
"""Greet the user with a message and the temperature in Celsius."""
|
22 |
salutation = "Good morning" if is_morning else "Good evening"
|
23 |
+
return f"{salutation} {name}. It is {temperature} degrees Celsius today."
|
24 |
|
25 |
|
26 |
with gr.Blocks() as demo:
|
|
|
40 |
with gr.Row():
|
41 |
with gr.Column():
|
42 |
name_input = gr.Text(label="What is your name?")
|
43 |
+
temperature_input = gr.Slider(-20, 50, label="What is the temperature?")
|
44 |
is_morning = gr.Checkbox(label="Is it morning?")
|
45 |
greeting_button = gr.Button("Greet")
|
46 |
with gr.Column():
|