thak123 commited on
Commit
7843225
1 Parent(s): ffc2eef

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -152,6 +152,7 @@ def predict_sentiment(text, image):
152
  "pixel_values":image,
153
  "attention_mask" : text_inputs.attention_mask,
154
  }
 
155
  prediction = None
156
  with torch.no_grad():
157
  prediction = model(input_ids=text_inputs.input_ids,attention_mask=text_inputs.attention_mask, pixel_values=image)
@@ -164,7 +165,7 @@ interface = gr.Interface(
164
  inputs=[gr.Textbox(),gr.Image(type="filepath")],
165
  outputs=['text'],
166
  title='Multilingual-Multimodal-Sentiment-Analysis',
167
- examples= [],
168
  description='Get the positive/neutral/negative sentiment for the given input.'
169
  )
170
 
 
152
  "pixel_values":image,
153
  "attention_mask" : text_inputs.attention_mask,
154
  }
155
+ print(model_input)
156
  prediction = None
157
  with torch.no_grad():
158
  prediction = model(input_ids=text_inputs.input_ids,attention_mask=text_inputs.attention_mask, pixel_values=image)
 
165
  inputs=[gr.Textbox(),gr.Image(type="filepath")],
166
  outputs=['text'],
167
  title='Multilingual-Multimodal-Sentiment-Analysis',
168
+ examples= [["I am enjoying","A_Sep20_14_1189155141.jpg"]],
169
  description='Get the positive/neutral/negative sentiment for the given input.'
170
  )
171