Instructions to use Seznam/small-e-czech with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Seznam/small-e-czech with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("Seznam/small-e-czech", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -17,8 +17,8 @@ fake_sentence = "Za hory, za doly, kočka zlaté parohy"
|
|
| 17 |
|
| 18 |
fake_sentence_tokens = ["[CLS]"] + tokenizer.tokenize(fake_sentence) + ["[SEP]"]
|
| 19 |
fake_inputs = tokenizer.encode(fake_sentence, return_tensors="pt")
|
| 20 |
-
|
| 21 |
-
predictions = torch.nn.Sigmoid()(
|
| 22 |
|
| 23 |
for token in fake_sentence_tokens:
|
| 24 |
print("{:>7s}".format(token), end="")
|
|
|
|
| 17 |
|
| 18 |
fake_sentence_tokens = ["[CLS]"] + tokenizer.tokenize(fake_sentence) + ["[SEP]"]
|
| 19 |
fake_inputs = tokenizer.encode(fake_sentence, return_tensors="pt")
|
| 20 |
+
outputs = discriminator(fake_inputs)
|
| 21 |
+
predictions = torch.nn.Sigmoid()(outputs[0]).cpu().detach().numpy()
|
| 22 |
|
| 23 |
for token in fake_sentence_tokens:
|
| 24 |
print("{:>7s}".format(token), end="")
|