Text Classification
Transformers
PyTorch
Safetensors
xlm-roberta
genre
text-genre
text-embeddings-inference
Instructions to use classla/xlm-roberta-base-multilingual-text-genre-classifier with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use classla/xlm-roberta-base-multilingual-text-genre-classifier with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="classla/xlm-roberta-base-multilingual-text-genre-classifier")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("classla/xlm-roberta-base-multilingual-text-genre-classifier") model = AutoModelForSequenceClassification.from_pretrained("classla/xlm-roberta-base-multilingual-text-genre-classifier", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -193,6 +193,8 @@ For language-specific results, see [the AGILE benchmark](https://github.com/Taja
|
|
| 193 |
|
| 194 |
### Usage
|
| 195 |
|
|
|
|
|
|
|
| 196 |
An example of preparing data for genre identification and post-processing of the results can be found [here](https://github.com/TajaKuzman/Applying-GENRE-on-MaCoCu-bilingual) where we applied X-GENRE classifier to the English part of [MaCoCu](https://macocu.eu/) parallel corpora.
|
| 197 |
|
| 198 |
For reliable results, genre classifier should be applied to documents of sufficient length (the rule of thumb is at least 75 words).
|
|
@@ -229,7 +231,6 @@ predictions
|
|
| 229 |
|
| 230 |
```
|
| 231 |
|
| 232 |
-
Use example for prediction on a dataset, using batch processing, is available via [Google Collab](https://colab.research.google.com/drive/1yC4L_p2t3oMViC37GqSjJynQH-EWyhLr?usp=sharing).
|
| 233 |
|
| 234 |
## X-GENRE categories
|
| 235 |
|
|
|
|
| 193 |
|
| 194 |
### Usage
|
| 195 |
|
| 196 |
+
Use example for prediction on a dataset, using batch processing, is available via [Google Collab](https://colab.research.google.com/drive/1yC4L_p2t3oMViC37GqSjJynQH-EWyhLr?usp=sharing).
|
| 197 |
+
|
| 198 |
An example of preparing data for genre identification and post-processing of the results can be found [here](https://github.com/TajaKuzman/Applying-GENRE-on-MaCoCu-bilingual) where we applied X-GENRE classifier to the English part of [MaCoCu](https://macocu.eu/) parallel corpora.
|
| 199 |
|
| 200 |
For reliable results, genre classifier should be applied to documents of sufficient length (the rule of thumb is at least 75 words).
|
|
|
|
| 231 |
|
| 232 |
```
|
| 233 |
|
|
|
|
| 234 |
|
| 235 |
## X-GENRE categories
|
| 236 |
|