Spaces:
Runtime error
Runtime error
Thedatababbler
commited on
Commit
·
afd57f7
1
Parent(s):
080a3e4
app
Browse files
app.py
CHANGED
@@ -36,7 +36,7 @@ def mlm(image, text):
|
|
36 |
with torch.no_grad():
|
37 |
predictions = model(tokens_tensor, segments_tensors)
|
38 |
|
39 |
-
_, predicted_index = torch.topk(predictions[0][0][masked_index],
|
40 |
predicted_index = predicted_index.detach().cpu().numpy()
|
41 |
#print(predicted_index)
|
42 |
for idx in predicted_index:
|
|
|
36 |
with torch.no_grad():
|
37 |
predictions = model(tokens_tensor, segments_tensors)
|
38 |
|
39 |
+
_, predicted_index = torch.topk(predictions[0][0][masked_index], 2)#.item()
|
40 |
predicted_index = predicted_index.detach().cpu().numpy()
|
41 |
#print(predicted_index)
|
42 |
for idx in predicted_index:
|