Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -50,7 +50,7 @@ class WeatherInput(BaseModel):
|
|
| 50 |
def get_weather_by_location(city: str = None):
|
| 51 |
"""Get the weather based on the user's location if no city is specified."""
|
| 52 |
|
| 53 |
-
if city=='':
|
| 54 |
location = get_location_from_ip()
|
| 55 |
city = location['city']
|
| 56 |
|
|
|
|
| 50 |
def get_weather_by_location(city: str = None):
|
| 51 |
"""Get the weather based on the user's location if no city is specified."""
|
| 52 |
|
| 53 |
+
if (city == '') or (city == None) or (not city):
|
| 54 |
location = get_location_from_ip()
|
| 55 |
city = location['city']
|
| 56 |
|