Spaces:
Build error
Build error
mnavas
commited on
Commit
·
e59c5eb
1
Parent(s):
46a8feb
app.py
CHANGED
@@ -24,7 +24,7 @@ def askcpv(description):
|
|
24 |
outputs = model(**encoding)
|
25 |
sigmoid = torch.nn.Sigmoid()
|
26 |
probs = sigmoid(outputs.logits.squeeze().cpu())
|
27 |
-
values, indices = torch.topk(probs, k=
|
28 |
# turn predicted id's into actual label names
|
29 |
# predicted_labels = [id2label[idx] for idx, label in enumerate(predictions) if label == 1.0]
|
30 |
# return predicted_labels
|
|
|
24 |
outputs = model(**encoding)
|
25 |
sigmoid = torch.nn.Sigmoid()
|
26 |
probs = sigmoid(outputs.logits.squeeze().cpu())
|
27 |
+
values, indices = torch.topk(probs, k=5)
|
28 |
# turn predicted id's into actual label names
|
29 |
# predicted_labels = [id2label[idx] for idx, label in enumerate(predictions) if label == 1.0]
|
30 |
# return predicted_labels
|