embed786 commited on
Commit
45558ba
·
verified ·
1 Parent(s): 411b1c7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -9,9 +9,10 @@ API_URL = "https://api-inference.huggingface.co/models/ibrahim313/my-imdb-sentim
9
 
10
  #HF_TOKEN
11
  # Auth headers if private model
12
- headers = {}
13
- if "hfsecret" in st.secrets:
14
- headers = {"Authorization": f"Bearer {st.secrets['hfsecret']}"}
 
15
 
16
  def query(payload):
17
  response = requests.post(API_URL, headers="", json=payload)
 
9
 
10
  #HF_TOKEN
11
  # Auth headers if private model
12
+ #headers = {}
13
+ #if "hfsecret" in st.secrets:
14
+ print(f"token : {st.secrets['hfsecret']}")
15
+ headers = {"Authorization": f"Bearer {st.secrets['hfsecret']}"}
16
 
17
  def query(payload):
18
  response = requests.post(API_URL, headers="", json=payload)