thak123 commited on
Commit
6fe0480
1 Parent(s): 169cd2b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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(