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

Update app.py

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