Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -16,9 +16,11 @@
|
|
16 |
# ---
|
17 |
|
18 |
import requests
|
|
|
19 |
|
20 |
API_URL = "https://api-inference.huggingface.co/models/kepinsam/ind-to-bbc-nmt-v5"
|
21 |
-
headers = {"Authorization": f"Bearer {API_TOKEN}"}
|
|
|
22 |
|
23 |
def query(payload):
|
24 |
response = requests.post(API_URL, headers=headers, json=payload)
|
|
|
16 |
# ---
|
17 |
|
18 |
import requests
|
19 |
+
import streamlit as st
|
20 |
|
21 |
API_URL = "https://api-inference.huggingface.co/models/kepinsam/ind-to-bbc-nmt-v5"
|
22 |
+
# headers = {"Authorization": f"Bearer {API_TOKEN}"}
|
23 |
+
headers = {"Authorization": f"Bearer {st.secrets["API_TOKEN"]}"}
|
24 |
|
25 |
def query(payload):
|
26 |
response = requests.post(API_URL, headers=headers, json=payload)
|