Text Classification
Transformers
PyTorch
Safetensors
xlm-roberta
TextClassificationPipeline
text-embeddings-inference
Instructions to use ssharoff/genres with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ssharoff/genres with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="ssharoff/genres")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("ssharoff/genres") model = AutoModelForSequenceClassification.from_pretrained("ssharoff/genres") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
| 1 |
---
|
| 2 |
license: cc-by-sa-4.0
|
|
|
|
|
|
|
| 3 |
---
|
| 4 |
|
| 5 |
# Model description:
|
|
@@ -7,10 +9,12 @@ license: cc-by-sa-4.0
|
|
| 7 |
This is a simple model aimed at predicting the genres of an arbitrary Web text.
|
| 8 |
|
| 9 |
It should be integrateable into the standard pipelines. For example:
|
|
|
|
| 10 |
from transformers import pipeline
|
| 11 |
classifier = pipeline("text-classification",model='ssharoff/genres')
|
| 12 |
-
print(classifier(""))
|
| 13 |
-
|
|
|
|
| 14 |
|
| 15 |
|
| 16 |
| Code | Label | Question to be answered | Prototypes | Comments |
|
|
|
|
| 1 |
---
|
| 2 |
license: cc-by-sa-4.0
|
| 3 |
+
tags:
|
| 4 |
+
- TextClassificationPipeline
|
| 5 |
---
|
| 6 |
|
| 7 |
# Model description:
|
|
|
|
| 9 |
This is a simple model aimed at predicting the genres of an arbitrary Web text.
|
| 10 |
|
| 11 |
It should be integrateable into the standard pipelines. For example:
|
| 12 |
+
```
|
| 13 |
from transformers import pipeline
|
| 14 |
classifier = pipeline("text-classification",model='ssharoff/genres')
|
| 15 |
+
print(classifier("Alice was beginning to get very tired of sitting by her sister on the bank, and of having nothing to do: once or twice she had peeped into the book her sister was reading, but it had no pictures or conversations in it."))
|
| 16 |
+
print(classifier("You ask, what is our policy? I will say: It is to wage war, by sea, land and air, with all our might and with all the strength that God can give us; to wage war against a monstrous tyranny, never surpassed in the dark and lamentable catalogue of human crime. That is our policy. You ask, what is our aim? I can answer in one word: Victory. Victory at all costs—Victory in spite of all terror—Victory, however long and hard the road may be, for without victory there is no survival."))
|
| 17 |
+
```
|
| 18 |
|
| 19 |
|
| 20 |
| Code | Label | Question to be answered | Prototypes | Comments |
|