Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -160,8 +160,8 @@ def predict_sentiment(text, image):
|
|
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 |
|
167 |
interface = gr.Interface(
|
|
|
160 |
outputs = model(**text_inputs)
|
161 |
print(outputs)
|
162 |
prediction = np.argmax(outputs["logits"], axis=-1)
|
163 |
+
print(id2label[prediction[0].item()])
|
164 |
+
return id2label[prediction[0].item()]
|
165 |
|
166 |
|
167 |
interface = gr.Interface(
|