Update README.md
Browse files
README.md
CHANGED
@@ -26,5 +26,10 @@ predictions = torch.argmax(logits, dim=-1)
|
|
26 |
tokens = tokenizer.convert_ids_to_tokens(inputs['input_ids'][0])
|
27 |
predicted_labels = [model.config.id2label[p.item()] for p in predictions[0]]
|
28 |
|
|
|
|
|
29 |
for token, label in zip(tokens, predicted_labels):
|
30 |
-
|
|
|
|
|
|
|
|
26 |
tokens = tokenizer.convert_ids_to_tokens(inputs['input_ids'][0])
|
27 |
predicted_labels = [model.config.id2label[p.item()] for p in predictions[0]]
|
28 |
|
29 |
+
|
30 |
+
components = []
|
31 |
for token, label in zip(tokens, predicted_labels):
|
32 |
+
components.append(f"{token} : {label}")
|
33 |
+
|
34 |
+
concat = " ; ".join(components)
|
35 |
+
print(concat)
|