Kyan14 commited on
Commit
431dc6f
·
1 Parent(s): c44d97e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -24,7 +24,7 @@ def get_mood_from_image(image: Image.Image):
24
  inputs = processor(text=text_inputs, images=image, return_tensors="pt", padding=True)
25
 
26
  # Run the model
27
- logits = model(**inputs).logits
28
  probs = logits.softmax(dim=-1).tolist()
29
 
30
  # Calculate the scores for each mood
 
24
  inputs = processor(text=text_inputs, images=image, return_tensors="pt", padding=True)
25
 
26
  # Run the model
27
+ logits = model(**inputs).logits_per_image
28
  probs = logits.softmax(dim=-1).tolist()
29
 
30
  # Calculate the scores for each mood