Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -15,9 +15,10 @@ ASSISTANT_PIC_PATH = "https://huggingface.co/spaces/PLRMB/P-MSQ-API-PREVIEW/reso
|
|
15 |
USER_PIC_PATH = "https://huggingface.co/spaces/PLRMB/P-MSQ-API-PREVIEW/resolve/main/usr.png"
|
16 |
|
17 |
def authorize(api_key):
|
|
|
18 |
test_data = {
|
19 |
"kind": "PER_DATA",
|
20 |
-
"identificator": api_key
|
21 |
}
|
22 |
test_headers = {
|
23 |
"Authorization": f"{API_TOKEN}",
|
@@ -30,6 +31,7 @@ def authorize(api_key):
|
|
30 |
if response.status_code == 200:
|
31 |
response_json = response.json()
|
32 |
if "identificator" in response_json:
|
|
|
33 |
return True
|
34 |
else:
|
35 |
print("Authorization failed: 'identificator' not found in response.")
|
|
|
15 |
USER_PIC_PATH = "https://huggingface.co/spaces/PLRMB/P-MSQ-API-PREVIEW/resolve/main/usr.png"
|
16 |
|
17 |
def authorize(api_key):
|
18 |
+
print(f"{api_key}")
|
19 |
test_data = {
|
20 |
"kind": "PER_DATA",
|
21 |
+
"identificator": f"{api_key}"
|
22 |
}
|
23 |
test_headers = {
|
24 |
"Authorization": f"{API_TOKEN}",
|
|
|
31 |
if response.status_code == 200:
|
32 |
response_json = response.json()
|
33 |
if "identificator" in response_json:
|
34 |
+
print("hi")
|
35 |
return True
|
36 |
else:
|
37 |
print("Authorization failed: 'identificator' not found in response.")
|