Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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
|