embed786 commited on
Commit
249d93a
·
verified ·
1 Parent(s): 28ff721

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -4
app.py CHANGED
@@ -7,13 +7,14 @@ st.set_page_config(page_title="IMDB Sentiment Analyzer 🎬", page_icon="🎬",
7
  # Hugging Face model API
8
  API_URL = "https://api-inference.huggingface.co/models/ibrahim313/my-imdb-sentiment-analyzer"
9
 
 
10
  # Auth headers if private model
11
- headers = {}
12
- if "HF_TOKEN" in st.secrets:
13
- headers = {"Authorization": f"Bearer {st.secrets['HF_TOKEN']}"}
14
 
15
  def query(payload):
16
- response = requests.post(API_URL, headers=headers, json=payload)
17
  return response.json()
18
 
19
  # --- UI ---
 
7
  # Hugging Face model API
8
  API_URL = "https://api-inference.huggingface.co/models/ibrahim313/my-imdb-sentiment-analyzer"
9
 
10
+ #HF_TOKEN
11
  # Auth headers if private model
12
+ #headers = {}
13
+ #if "HF_TOKEN" in st.secrets:
14
+ #headers = {"Authorization": f"Bearer {HF_TOKEN']}"}
15
 
16
  def query(payload):
17
+ response = requests.post(API_URL, headers="", json=payload)
18
  return response.json()
19
 
20
  # --- UI ---