Instructions to use QomSSLab/SubjectClassifier-v1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use QomSSLab/SubjectClassifier-v1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="QomSSLab/SubjectClassifier-v1")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("QomSSLab/SubjectClassifier-v1") model = AutoModelForSequenceClassification.from_pretrained("QomSSLab/SubjectClassifier-v1", device_map="auto") - Notebooks
- Google Colab
- Kaggle
QomSSLab/SubjectClassifier-v1
This repository hosts a sequence-classification head trained for text classification.
Usage
from transformers import AutoTokenizer, AutoModelForSequenceClassification, pipeline
model_id = "QomSSLab/SubjectClassifier-v1"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForSequenceClassification.from_pretrained(model_id)
classifier = pipeline("text-classification", model=model, tokenizer=tokenizer)
text = "مثال از یک ورودی فارسی"
print(classifier(text))
Labels
اخلاقتاریخحدیثسیاسیفقه و احکامقرآنمشاورهکلام و اعتقادات
Metrics
Validation Metrics
- Precision: 0.9717
- Recall: 0.9713
- F1: 0.9713
- Accuracy: 0.9713
Per-label Breakdown
| Label | Precision | Recall | F1 | Support |
|---|---|---|---|---|
| اخلاق | 0.9455 | 0.9598 | 0.9526 | 199 |
| تاریخ | 0.9815 | 1.0000 | 0.9907 | 53 |
| حدیث | 0.9487 | 0.9823 | 0.9652 | 113 |
| سیاسی | 1.0000 | 0.9693 | 0.9844 | 163 |
| فقه و احکام | 0.9652 | 1.0000 | 0.9823 | 222 |
| قرآن | 1.0000 | 0.9875 | 0.9937 | 80 |
| مشاوره | 0.9670 | 0.9263 | 0.9462 | 95 |
| کلام و اعتقادات | 0.9818 | 0.9558 | 0.9686 | 226 |
- Downloads last month
- -