alex-abb commited on
Commit
867427f
·
verified ·
1 Parent(s): 2da4e53

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -3,10 +3,14 @@ import requests
3
  import spaces
4
 
5
  API_URL = "https://api-inference.huggingface.co/models/distilbert-base-uncased-finetuned-sst-2-english"
6
- headers = {"Authorization": "Bearer hf_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"}
7
 
8
  @spaces.GPU
9
 
 
 
 
 
10
  def analyze_sentiment(text):
11
  payload = {"inputs": text}
12
  try:
 
3
  import spaces
4
 
5
  API_URL = "https://api-inference.huggingface.co/models/distilbert-base-uncased-finetuned-sst-2-english"
6
+ headers = {"Authorization": "api_key"}
7
 
8
  @spaces.GPU
9
 
10
+
11
+ api_key = os.getenv("TOKEN")
12
+
13
+
14
  def analyze_sentiment(text):
15
  payload = {"inputs": text}
16
  try: