Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -59,8 +59,9 @@ def generate_answer_git(processor, model, image, question):
|
|
| 59 |
|
| 60 |
with torch.no_grad():
|
| 61 |
outputs = model(**encoding)
|
| 62 |
-
|
| 63 |
-
|
|
|
|
| 64 |
|
| 65 |
|
| 66 |
return 'haha'
|
|
|
|
| 59 |
|
| 60 |
with torch.no_grad():
|
| 61 |
outputs = model(**encoding)
|
| 62 |
+
print(outputs.logits)
|
| 63 |
+
predicted_class_idx = outputs.logits.argmax(-1)
|
| 64 |
+
# return model.config.id2label[predicted_class_idx]
|
| 65 |
|
| 66 |
|
| 67 |
return 'haha'
|