Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -45,7 +45,7 @@ def get_weather(city: str) -> str:
|
|
| 45 |
cityTemp = weatherJSON.get('current').get('temp_c')
|
| 46 |
cityCondition = weatherJSON.get('current').get('condition').get('text')
|
| 47 |
return f"The current Temperature in {cityName} is {cityTemp} in degree celcius and conditions are {cityCondition}"
|
| 48 |
-
except
|
| 49 |
return f"Error fetching weather conditions for {city}"
|
| 50 |
|
| 51 |
|
|
|
|
| 45 |
cityTemp = weatherJSON.get('current').get('temp_c')
|
| 46 |
cityCondition = weatherJSON.get('current').get('condition').get('text')
|
| 47 |
return f"The current Temperature in {cityName} is {cityTemp} in degree celcius and conditions are {cityCondition}"
|
| 48 |
+
except Exception as e:
|
| 49 |
return f"Error fetching weather conditions for {city}"
|
| 50 |
|
| 51 |
|