Spaces:
Paused
Paused
Update func_ai.py
Browse files- func_ai.py +4 -5
func_ai.py
CHANGED
@@ -1,13 +1,12 @@
|
|
|
|
|
|
1 |
import requests
|
2 |
import torch
|
3 |
-
from transformers import pipeline
|
4 |
from deep_translator import GoogleTranslator
|
5 |
-
import
|
6 |
-
import os
|
7 |
|
8 |
-
VECTOR_API_URL = os.getenv('API_URL')
|
9 |
|
10 |
-
#
|
11 |
sentiment_model = pipeline(
|
12 |
'sentiment-analysis',
|
13 |
model='distilbert-base-uncased-finetuned-sst-2-english',
|
|
|
1 |
+
import time
|
2 |
+
|
3 |
import requests
|
4 |
import torch
|
|
|
5 |
from deep_translator import GoogleTranslator
|
6 |
+
from transformers import pipeline
|
|
|
7 |
|
|
|
8 |
|
9 |
+
# Replace the sentiment analysis model
|
10 |
sentiment_model = pipeline(
|
11 |
'sentiment-analysis',
|
12 |
model='distilbert-base-uncased-finetuned-sst-2-english',
|