thak123 commited on
Commit
17c3752
·
verified ·
1 Parent(s): 4e12a6f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -126,7 +126,9 @@ image_processor = AutoImageProcessor.from_pretrained("openai/clip-vit-base-patch
126
 
127
  def predict_sentiment(text, image):
128
  print(text, image)
129
- image = Image.open(image)
 
 
130
  text_inputs = tokenizer(
131
  text,
132
  max_length=512,
 
126
 
127
  def predict_sentiment(text, image):
128
  print(text, image)
129
+ image = torch.from_numpy(image)
130
+ print(image.shape)
131
+
132
  text_inputs = tokenizer(
133
  text,
134
  max_length=512,