Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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):
|