Spaces:
Sleeping
Sleeping
Update app.py
Browse filesNew addition to docstring.
app.py
CHANGED
|
@@ -31,10 +31,10 @@ def get_temperature(location: str, temp_scale: str = "celsius") -> tuple[float,
|
|
| 31 |
- unit (str): The temperature unit ('C' or 'F')
|
| 32 |
- description (str): How the temperature feels (freezing/cold/mild/warm/hot)
|
| 33 |
Usage:
|
|
|
|
| 34 |
temp, unit, feel = get_temperature("Warsaw", "celsius")
|
| 35 |
Example output: (-2.4, 'C', 'freezing')
|
| 36 |
Formatted: "The current temperature in Warsaw is -2.4°C - it feels freezing"
|
| 37 |
-
Always provide temperature value and qualitative description.
|
| 38 |
"""
|
| 39 |
def get_description(temp_c: float) -> str:
|
| 40 |
"""Get qualitative description based on Celsius temperature"""
|
|
|
|
| 31 |
- unit (str): The temperature unit ('C' or 'F')
|
| 32 |
- description (str): How the temperature feels (freezing/cold/mild/warm/hot)
|
| 33 |
Usage:
|
| 34 |
+
Always provide temperature value and qualitative description.
|
| 35 |
temp, unit, feel = get_temperature("Warsaw", "celsius")
|
| 36 |
Example output: (-2.4, 'C', 'freezing')
|
| 37 |
Formatted: "The current temperature in Warsaw is -2.4°C - it feels freezing"
|
|
|
|
| 38 |
"""
|
| 39 |
def get_description(temp_c: float) -> str:
|
| 40 |
"""Get qualitative description based on Celsius temperature"""
|