rjiang12 commited on
Commit
06b58b5
·
1 Parent(s): dc4835e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -67,7 +67,7 @@ def generate_answer_vilt(processor, model, image, question):
67
  print(torch.softmax(outputs.logits, dim=1))
68
  predicted_class_idx = outputs.logits.argmax(-1).item()
69
  print(f"prdicted_class_idx: {predicted_class_idx}")
70
- logitsList = outputs.logits.flatten().tolist()
71
  print(f"predicted_class_idx_in_list = {logitsList.index(max(logitsList))}")
72
  m = max(logitsList)
73
  s = -math.inf
 
67
  print(torch.softmax(outputs.logits, dim=1))
68
  predicted_class_idx = outputs.logits.argmax(-1).item()
69
  print(f"prdicted_class_idx: {predicted_class_idx}")
70
+ logitsList = torch.softmax(outputs.logits, dim=1).flatten().tolist()
71
  print(f"predicted_class_idx_in_list = {logitsList.index(max(logitsList))}")
72
  m = max(logitsList)
73
  s = -math.inf