Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -6,9 +6,9 @@ import os
|
|
| 6 |
API_URL = "https://host.palple.polrambora.com/pmsq"
|
| 7 |
API_TOKEN = os.getenv("POLLY")
|
| 8 |
|
| 9 |
-
|
| 10 |
-
"
|
| 11 |
-
"
|
| 12 |
}
|
| 13 |
|
| 14 |
ASSISTANT_PIC_PATH = "https://huggingface.co/spaces/PLRMB/P-MSQ-API-PREVIEW/resolve/main/API.png"
|
|
@@ -17,10 +17,10 @@ USER_PIC_PATH = "https://huggingface.co/spaces/PLRMB/P-MSQ-API-PREVIEW/resolve/m
|
|
| 17 |
def authorize(api_key):
|
| 18 |
test_data = {
|
| 19 |
"kind": "PER_DATA",
|
| 20 |
-
"identificator": api_key
|
| 21 |
}
|
| 22 |
test_headers = {
|
| 23 |
-
"
|
| 24 |
"Content-Type": "application/json",
|
| 25 |
}
|
| 26 |
|
|
|
|
| 6 |
API_URL = "https://host.palple.polrambora.com/pmsq"
|
| 7 |
API_TOKEN = os.getenv("POLLY")
|
| 8 |
|
| 9 |
+
headers = {
|
| 10 |
+
"authorization":"",
|
| 11 |
+
"Content-Type": 'application/json',
|
| 12 |
}
|
| 13 |
|
| 14 |
ASSISTANT_PIC_PATH = "https://huggingface.co/spaces/PLRMB/P-MSQ-API-PREVIEW/resolve/main/API.png"
|
|
|
|
| 17 |
def authorize(api_key):
|
| 18 |
test_data = {
|
| 19 |
"kind": "PER_DATA",
|
| 20 |
+
"identificator": api_key
|
| 21 |
}
|
| 22 |
test_headers = {
|
| 23 |
+
"authorization": f"{os.getenv("KEY")}",
|
| 24 |
"Content-Type": "application/json",
|
| 25 |
}
|
| 26 |
|