Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -20,7 +20,7 @@ def predict(text, request: gr.Request):
|
|
| 20 |
ip_address = request.client.host
|
| 21 |
|
| 22 |
# Call the WorldTimeAPI to get the timezone for the user's IP address
|
| 23 |
-
response = requests.get(f'
|
| 24 |
time_data = response.json()
|
| 25 |
|
| 26 |
# Extract the timezone from the API response
|
|
|
|
| 20 |
ip_address = request.client.host
|
| 21 |
|
| 22 |
# Call the WorldTimeAPI to get the timezone for the user's IP address
|
| 23 |
+
response = requests.get(f'https://worldtimeapi.org/api/ip/{ip_address}')
|
| 24 |
time_data = response.json()
|
| 25 |
|
| 26 |
# Extract the timezone from the API response
|