Update app.py
Browse files
app.py
CHANGED
|
@@ -1,10 +1,12 @@
|
|
| 1 |
import requests
|
| 2 |
import json
|
|
|
|
| 3 |
|
|
|
|
| 4 |
API_URL = "https://kp4xdy196cw81uf3.us-east-1.aws.endpoints.huggingface.cloud"
|
| 5 |
headers = {
|
| 6 |
"Accept" : "application/json",
|
| 7 |
-
"Authorization": "Bearer
|
| 8 |
"Content-Type": "application/json"
|
| 9 |
}
|
| 10 |
|
|
|
|
| 1 |
import requests
|
| 2 |
import json
|
| 3 |
+
import os
|
| 4 |
|
| 5 |
+
token = os.getenv('HUGGINGFACEHUB_API_TOKEN')
|
| 6 |
API_URL = "https://kp4xdy196cw81uf3.us-east-1.aws.endpoints.huggingface.cloud"
|
| 7 |
headers = {
|
| 8 |
"Accept" : "application/json",
|
| 9 |
+
"Authorization": "Bearer " + token,
|
| 10 |
"Content-Type": "application/json"
|
| 11 |
}
|
| 12 |
|