Instructions to use QomSSLab/verdict_classifier_v1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use QomSSLab/verdict_classifier_v1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="QomSSLab/verdict_classifier_v1")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("QomSSLab/verdict_classifier_v1") model = AutoModelForSequenceClassification.from_pretrained("QomSSLab/verdict_classifier_v1", device_map="auto") - Notebooks
- Google Colab
- Kaggle
|
Download README.md from QomSSLab/verdict_classifier_v1: direct link, hf CLI and curl.
- Browser
- Download file 1.04 kB
-
https://huggingface.co/QomSSLab/verdict_classifier_v1/resolve/main/README.md
- Command line
-
hf download hf://QomSSLab/verdict_classifier_v1/README.md
-
curl -L -H "Authorization: Bearer $HF_TOKEN" -o README.md https://huggingface.co/QomSSLab/verdict_classifier_v1/resolve/main/README.md
1.04 kB
| language: fa | |
| pipeline_tag: text-classification | |
| library_name: transformers | |
| # QomSSLab/verdict_classifier_v1 | |
| This repository hosts a sequence-classification head trained for text classification. | |
| ## Usage | |
| ```python | |
| from transformers import AutoTokenizer, AutoModelForSequenceClassification, pipeline | |
| model_id = "QomSSLab/verdict_classifier_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 | |
| - `1` | |
| - `2` | |
| - `3` | |
| - `4` | |
| ## Metrics | |
| ## Validation Metrics | |
| - Precision: 0.9523 | |
| - Recall: 0.9514 | |
| - F1: 0.9514 | |
| - Accuracy: 0.9514 | |
| ### Per-label Breakdown | |
| | Label | Precision | Recall | F1 | Support | | |
| | --- | --- | --- | --- | --- | | |
| | 1 | 0.9643 | 0.9818 | 0.9730 | 110 | | |
| | 2 | 0.9903 | 0.9273 | 0.9577 | 110 | | |
| | 3 | 0.9304 | 0.9727 | 0.9511 | 110 | | |
| | 4 | 0.8750 | 0.8750 | 0.8750 | 40 | | |