Spaces:
Sleeping
Sleeping
added new tool
Browse files
app.py
CHANGED
|
@@ -21,7 +21,7 @@ def get_temperature(city:str)-> str: #it's import to specify the return type
|
|
| 21 |
if response.status_code == 200:
|
| 22 |
temperature = response.text.strip()
|
| 23 |
print(f"The current temperature in {city} is {temperature}")
|
| 24 |
-
return f"The current temperature in {city} is {temperature}
|
| 25 |
else:
|
| 26 |
print(f"Error fetching weather for {city}: HTTP {response.status_code}")
|
| 27 |
return f"Error fetching weather for {city}: HTTP {response.status_code}"
|
|
|
|
| 21 |
if response.status_code == 200:
|
| 22 |
temperature = response.text.strip()
|
| 23 |
print(f"The current temperature in {city} is {temperature}")
|
| 24 |
+
return f"The current temperature in {city} is {temperature}"
|
| 25 |
else:
|
| 26 |
print(f"Error fetching weather for {city}: HTTP {response.status_code}")
|
| 27 |
return f"Error fetching weather for {city}: HTTP {response.status_code}"
|