Spaces:
Runtime error
Runtime error
thinh-huynh-re
commited on
Commit
•
7586903
1
Parent(s):
24611b8
Update
Browse files
app.py
CHANGED
@@ -70,7 +70,7 @@ def inference(file_path: str):
|
|
70 |
predicted_label = logits.argmax(-1).item()
|
71 |
print(model.config.id2label[predicted_label])
|
72 |
|
73 |
-
TOP_K =
|
74 |
# logits = np.squeeze(logits)
|
75 |
logits = logits.squeeze().numpy()
|
76 |
indices = np.argsort(logits)[::-1][:TOP_K]
|
|
|
70 |
predicted_label = logits.argmax(-1).item()
|
71 |
print(model.config.id2label[predicted_label])
|
72 |
|
73 |
+
TOP_K = 12
|
74 |
# logits = np.squeeze(logits)
|
75 |
logits = logits.squeeze().numpy()
|
76 |
indices = np.argsort(logits)[::-1][:TOP_K]
|