Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -2,8 +2,8 @@ import requests
|
|
2 |
import streamlit as st
|
3 |
|
4 |
API_URL = "https://api-inference.huggingface.co/models/kepinsam/bbc-to-ind-nmt-v5"
|
5 |
-
headers = {"Authorization": f"Bearer {API_TOKEN}"}
|
6 |
-
|
7 |
|
8 |
def query(payload):
|
9 |
response = requests.post(API_URL, headers=headers, json=payload)
|
|
|
2 |
import streamlit as st
|
3 |
|
4 |
API_URL = "https://api-inference.huggingface.co/models/kepinsam/bbc-to-ind-nmt-v5"
|
5 |
+
# headers = {"Authorization": f"Bearer {API_TOKEN}"}
|
6 |
+
headers = {"Authorization": f"Bearer {st.secrets['API_TOKEN']}"}
|
7 |
|
8 |
def query(payload):
|
9 |
response = requests.post(API_URL, headers=headers, json=payload)
|