Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -51,7 +51,7 @@ def preprocess_text(text):
|
|
51 |
def predict_sentiment(text):
|
52 |
if not text:
|
53 |
return 0.0
|
54 |
-
text =
|
55 |
encoded_input = tokenizer(text, return_tensors='pt')
|
56 |
output = model(**encoded_input)
|
57 |
scores = output[0][0].detach().numpy()
|
|
|
51 |
def predict_sentiment(text):
|
52 |
if not text:
|
53 |
return 0.0
|
54 |
+
text = preprocess_text(text)
|
55 |
encoded_input = tokenizer(text, return_tensors='pt')
|
56 |
output = model(**encoded_input)
|
57 |
scores = output[0][0].detach().numpy()
|