gathemin commited on
Commit
1aa45bc
·
verified ·
1 Parent(s): b1023a7

Update temperature

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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} Fahrenheit today."
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(0, 100, label="What is the temperature?")
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():