Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -157,8 +157,10 @@ def predict_sentiment(text, image):
|
|
157 |
|
158 |
prediction = None
|
159 |
with torch.no_grad():
|
160 |
-
|
161 |
-
print(
|
|
|
|
|
162 |
return prediction
|
163 |
|
164 |
|
|
|
157 |
|
158 |
prediction = None
|
159 |
with torch.no_grad():
|
160 |
+
outputs = model(**text_inputs)
|
161 |
+
print(outputs)
|
162 |
+
prediction = np.argmax(outputs["logits"], axis=-1)
|
163 |
+
print(id2label[prediction[0]])
|
164 |
return prediction
|
165 |
|
166 |
|