Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -16,7 +16,8 @@ def render_avatars(userid):
|
|
16 |
'https://host.palple.polrambora.com/userexistence',
|
17 |
json={
|
18 |
'userid': userid
|
19 |
-
}
|
|
|
20 |
)
|
21 |
|
22 |
if response.status_code == 200:
|
@@ -24,6 +25,8 @@ def render_avatars(userid):
|
|
24 |
return response_json["avatar"]["link"]
|
25 |
except Exception as e:
|
26 |
return None
|
|
|
|
|
27 |
|
28 |
|
29 |
def authorize(user, api_key, system_message):
|
|
|
16 |
'https://host.palple.polrambora.com/userexistence',
|
17 |
json={
|
18 |
'userid': userid
|
19 |
+
},
|
20 |
+
timeout=10
|
21 |
)
|
22 |
|
23 |
if response.status_code == 200:
|
|
|
25 |
return response_json["avatar"]["link"]
|
26 |
except Exception as e:
|
27 |
return None
|
28 |
+
except requests.exceptions.Timeout:
|
29 |
+
return None
|
30 |
|
31 |
|
32 |
def authorize(user, api_key, system_message):
|