"error":"Authorization header is invalid, use 'Bearer API_TOKEN'"
Browse files
app.py
CHANGED
|
@@ -12,7 +12,7 @@ huggingface_token = os.getenv('HF_TOKEN')
|
|
| 12 |
if huggingface_token is not None:
|
| 13 |
os.environ['HUGGINGFACE_CO_API_TOKEN'] = huggingface_token
|
| 14 |
API_URL = "https://api-inference.huggingface.co/models/Tokymin/Mood_Anxiety_Disorder_Classify_Model"
|
| 15 |
-
headers = {"Authorization": f"
|
| 16 |
else:
|
| 17 |
print("error, no token")
|
| 18 |
exit(0)
|
|
|
|
| 12 |
if huggingface_token is not None:
|
| 13 |
os.environ['HUGGINGFACE_CO_API_TOKEN'] = huggingface_token
|
| 14 |
API_URL = "https://api-inference.huggingface.co/models/Tokymin/Mood_Anxiety_Disorder_Classify_Model"
|
| 15 |
+
headers = {"Authorization": f"Bearer {huggingface_token}"}
|
| 16 |
else:
|
| 17 |
print("error, no token")
|
| 18 |
exit(0)
|