Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -9,7 +9,7 @@ def greet(name):
|
|
9 |
def classify(text):
|
10 |
return {"cat": 0.3, "dog": 0.7}
|
11 |
|
12 |
-
def predict_sentiment(text):
|
13 |
if model == "finiteautomata/bertweet-base-sentiment-analysis":
|
14 |
pipe = pipeline("text-classification", model="finiteautomata/bertweet-base-sentiment-analysis")
|
15 |
out = pipe(text, return_all_scores=True)
|
|
|
9 |
def classify(text):
|
10 |
return {"cat": 0.3, "dog": 0.7}
|
11 |
|
12 |
+
def predict_sentiment(text, model):
|
13 |
if model == "finiteautomata/bertweet-base-sentiment-analysis":
|
14 |
pipe = pipeline("text-classification", model="finiteautomata/bertweet-base-sentiment-analysis")
|
15 |
out = pipe(text, return_all_scores=True)
|