Commit
·
d78af2d
1
Parent(s):
384368c
Update app.py
Browse files
app.py
CHANGED
|
@@ -5,7 +5,7 @@ import os
|
|
| 5 |
SECRET_TOKEN = os.getenv("SECRET_TOKEN")
|
| 6 |
|
| 7 |
API_URL = "https://api-inference.huggingface.co/models/ahmedrachid/FinancialBERT-Sentiment-Analysis"
|
| 8 |
-
headers = {"Authorization": "Bearer SECRET_TOKEN"}
|
| 9 |
|
| 10 |
def query(payload):
|
| 11 |
response = requests.post(API_URL, headers=headers, json=payload)
|
|
@@ -46,3 +46,5 @@ output_text.pack()
|
|
| 46 |
|
| 47 |
|
| 48 |
window.mainloop()
|
|
|
|
|
|
|
|
|
| 5 |
SECRET_TOKEN = os.getenv("SECRET_TOKEN")
|
| 6 |
|
| 7 |
API_URL = "https://api-inference.huggingface.co/models/ahmedrachid/FinancialBERT-Sentiment-Analysis"
|
| 8 |
+
headers = {"Authorization": "Bearer {SECRET_TOKEN}"}
|
| 9 |
|
| 10 |
def query(payload):
|
| 11 |
response = requests.post(API_URL, headers=headers, json=payload)
|
|
|
|
| 46 |
|
| 47 |
|
| 48 |
window.mainloop()
|
| 49 |
+
|
| 50 |
+
|