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

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -157,8 +157,10 @@ def predict_sentiment(text, image):
157
 
158
  prediction = None
159
  with torch.no_grad():
160
- prediction = model(**text_inputs)
161
- print(prediction)
 
 
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