Instructions to use RashidNLP/German-Text-Classification with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use RashidNLP/German-Text-Classification with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="RashidNLP/German-Text-Classification")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("RashidNLP/German-Text-Classification") model = AutoModelForSequenceClassification.from_pretrained("RashidNLP/German-Text-Classification", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -7,7 +7,7 @@ tags:
|
|
| 7 |
- Discourse Analysis
|
| 8 |
- German text classification
|
| 9 |
---
|
| 10 |
-
# Roberta for German
|
| 11 |
|
| 12 |
This is a xlm Roberta model finetuned on a German Discourse dataset of 60 discourses having a total over 10k sentences.
|
| 13 |
|
|
@@ -40,7 +40,7 @@ def get_label(sentence):
|
|
| 40 |
bert_dict[keys[i]] = round(probs[i].item(), 3)
|
| 41 |
return bert_dict
|
| 42 |
|
| 43 |
-
MODEL_NAME = 'RashidNLP/
|
| 44 |
MODEL_DIR = 'model'
|
| 45 |
CHECKPOINT_DIR = 'checkpoints'
|
| 46 |
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
|
|
|
|
| 7 |
- Discourse Analysis
|
| 8 |
- German text classification
|
| 9 |
---
|
| 10 |
+
# Roberta for German text Classification
|
| 11 |
|
| 12 |
This is a xlm Roberta model finetuned on a German Discourse dataset of 60 discourses having a total over 10k sentences.
|
| 13 |
|
|
|
|
| 40 |
bert_dict[keys[i]] = round(probs[i].item(), 3)
|
| 41 |
return bert_dict
|
| 42 |
|
| 43 |
+
MODEL_NAME = 'RashidNLP/German-Text-Classification'
|
| 44 |
MODEL_DIR = 'model'
|
| 45 |
CHECKPOINT_DIR = 'checkpoints'
|
| 46 |
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
|