Update README.md
Browse files
README.md
CHANGED
@@ -23,7 +23,7 @@ inputs = tokenizer(some_text, return_tensors='pt')
|
|
23 |
output = model.forward(inputs)
|
24 |
probas = torch.nn.functional.softmax(output.logits[0]).detach().numpy()
|
25 |
|
26 |
-
#
|
27 |
input_tokens = tokenizer.convert_ids_to_tokens(inputs['input_ids'][0])
|
28 |
target_map = {0: 'B-Negated', 1:'B-NotNegated',2:'I-Negated',3:'I-NotNegated'}
|
29 |
results = [{'token': input_tokens[idx],
|
|
|
23 |
output = model.forward(inputs)
|
24 |
probas = torch.nn.functional.softmax(output.logits[0]).detach().numpy()
|
25 |
|
26 |
+
# associate with tokens
|
27 |
input_tokens = tokenizer.convert_ids_to_tokens(inputs['input_ids'][0])
|
28 |
target_map = {0: 'B-Negated', 1:'B-NotNegated',2:'I-Negated',3:'I-NotNegated'}
|
29 |
results = [{'token': input_tokens[idx],
|