Instructions to use jinmang2/textcnn-ko-dialect-classifier with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use jinmang2/textcnn-ko-dialect-classifier with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="jinmang2/textcnn-ko-dialect-classifier", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForSequenceClassification model = AutoModelForSequenceClassification.from_pretrained("jinmang2/textcnn-ko-dialect-classifier", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Update modeling_textcnn.py
Browse files- modeling_textcnn.py +2 -2
modeling_textcnn.py
CHANGED
|
@@ -39,11 +39,11 @@ class TextCNNPreTrainedModel(PreTrainedModel):
|
|
| 39 |
"attention_mask": input_ids.ne(pad_token),
|
| 40 |
"input_ids": input_ids,
|
| 41 |
}
|
| 42 |
-
dummy_inputs
|
| 43 |
|
| 44 |
|
| 45 |
class TextCNNModel(TextCNNPreTrainedModel):
|
| 46 |
-
""" A
|
| 47 |
|
| 48 |
def __init__(self, config):
|
| 49 |
super().__init__(config)
|
|
|
|
| 39 |
"attention_mask": input_ids.ne(pad_token),
|
| 40 |
"input_ids": input_ids,
|
| 41 |
}
|
| 42 |
+
return dummy_inputs
|
| 43 |
|
| 44 |
|
| 45 |
class TextCNNModel(TextCNNPreTrainedModel):
|
| 46 |
+
""" A style classifier Text-CNN """
|
| 47 |
|
| 48 |
def __init__(self, config):
|
| 49 |
super().__init__(config)
|