KishanKumar001
commited on
Commit
·
384368c
1
Parent(s):
c4251ad
Update app.py
Browse files
app.py
CHANGED
@@ -1,9 +1,11 @@
|
|
1 |
import tkinter as tk
|
2 |
from tkinter import scrolledtext
|
3 |
import requests
|
|
|
|
|
4 |
|
5 |
API_URL = "https://api-inference.huggingface.co/models/ahmedrachid/FinancialBERT-Sentiment-Analysis"
|
6 |
-
headers = {"Authorization": "Bearer
|
7 |
|
8 |
def query(payload):
|
9 |
response = requests.post(API_URL, headers=headers, json=payload)
|
|
|
1 |
import tkinter as tk
|
2 |
from tkinter import scrolledtext
|
3 |
import requests
|
4 |
+
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)
|