Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,14 +1,20 @@
|
|
1 |
-
|
2 |
-
import
|
3 |
|
4 |
-
|
5 |
|
6 |
-
|
7 |
-
|
8 |
-
user_ip = request.remote_addr
|
9 |
-
location = geocoder.ip(user_ip).city
|
10 |
-
# Do something with the user's location
|
11 |
-
return f"Your location is: {location}"
|
12 |
|
13 |
-
|
14 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import requests
|
2 |
+
import urllib3
|
3 |
|
4 |
+
api_url = "https://ai-app-ly.infinityfreeapp.com"
|
5 |
|
6 |
+
# Disable SSL certificate verification
|
7 |
+
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
|
|
|
|
|
|
|
|
|
8 |
|
9 |
+
|
10 |
+
data = {
|
11 |
+
"register": True,
|
12 |
+
"username": "rth",
|
13 |
+
"password": "gkfgfgh"
|
14 |
+
}
|
15 |
+
|
16 |
+
response = requests.post(api_url, data=data, verify=False)
|
17 |
+
json_data = response.json()
|
18 |
+
message = json_data['message']
|
19 |
+
|
20 |
+
print(message)
|