Zero-Shot Classification
Transformers
PyTorch
Japanese
fasttext_classification
text-classification
fastText
custom_code
Instructions to use paulhindemith/fasttext-classification with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use paulhindemith/fasttext-classification with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("zero-shot-classification", model="paulhindemith/fasttext-classification", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForSequenceClassification model = AutoModelForSequenceClassification.from_pretrained("paulhindemith/fasttext-classification", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Commit ·
31d9e69
1
Parent(s): abb2507
Update README.md
Browse files
README.md
CHANGED
|
@@ -8,7 +8,7 @@ tags:
|
|
| 8 |
pipeline_tag: zero-shot-classification
|
| 9 |
widget:
|
| 10 |
- text: "海賊王におれはなる"
|
| 11 |
-
candidate_labels: "海
|
| 12 |
multi_class: true
|
| 13 |
example_title: "ワンピース"
|
| 14 |
---
|
|
@@ -32,5 +32,5 @@ from transformers import pipeline
|
|
| 32 |
p = pipeline("zero-shot-classification", "paulhindemith/fasttext-classification", revision="2022.11.7", trust_remote_code=True)
|
| 33 |
```
|
| 34 |
```
|
| 35 |
-
p("海賊王におれはなる", candidate_labels=["海",
|
| 36 |
```
|
|
|
|
| 8 |
pipeline_tag: zero-shot-classification
|
| 9 |
widget:
|
| 10 |
- text: "海賊王におれはなる"
|
| 11 |
+
candidate_labels: "海, 山, 陸"
|
| 12 |
multi_class: true
|
| 13 |
example_title: "ワンピース"
|
| 14 |
---
|
|
|
|
| 32 |
p = pipeline("zero-shot-classification", "paulhindemith/fasttext-classification", revision="2022.11.7", trust_remote_code=True)
|
| 33 |
```
|
| 34 |
```
|
| 35 |
+
p("海賊王におれはなる", candidate_labels=["海","山","陸"], hypothesis_template="{}", multi_label=True)
|
| 36 |
```
|