Commit
·
7bcffd2
1
Parent(s):
bcca52c
Update app.py
Browse files
app.py
CHANGED
@@ -20,6 +20,7 @@ def predict(text=None) -> dict:
|
|
20 |
token_logits = model(input_ids, attention_mask=attention_mask).logits
|
21 |
print(token_logits )
|
22 |
mask_token_index = torch.where(inputs["input_ids"] == tokenizer.mask_token_id)[1]
|
|
|
23 |
print(mask_token_index)
|
24 |
mask_token_logits = token_logits[0, mask_token_index, :]
|
25 |
print(mask_token_logits)
|
|
|
20 |
token_logits = model(input_ids, attention_mask=attention_mask).logits
|
21 |
print(token_logits )
|
22 |
mask_token_index = torch.where(inputs["input_ids"] == tokenizer.mask_token_id)[1]
|
23 |
+
print(tokenizer.mask_token_id, inputs["input_ids"])
|
24 |
print(mask_token_index)
|
25 |
mask_token_logits = token_logits[0, mask_token_index, :]
|
26 |
print(mask_token_logits)
|