Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -63,7 +63,8 @@ def generate_answer_vilt(processor, model, image, question):
|
|
| 63 |
with torch.no_grad():
|
| 64 |
outputs = model(**encoding)
|
| 65 |
print(outputs.logits)
|
| 66 |
-
|
|
|
|
| 67 |
predicted_class_idx = outputs.logits.argmax(-1).item()
|
| 68 |
logitsList = outputs.logits.tolist()
|
| 69 |
print(logitsList)
|
|
|
|
| 63 |
with torch.no_grad():
|
| 64 |
outputs = model(**encoding)
|
| 65 |
print(outputs.logits)
|
| 66 |
+
lsm = torch.nn.LogSoftmax(dim=1)
|
| 67 |
+
print(lsm(outputs.logits))
|
| 68 |
predicted_class_idx = outputs.logits.argmax(-1).item()
|
| 69 |
logitsList = outputs.logits.tolist()
|
| 70 |
print(logitsList)
|