This model is built on the
DistilBERT architecture, specifically utilizing the
distilbert-base-uncased variant, and is designed to classify text into two categories: statements and questions. It leverages the strengths of the DistilBERT model, known for its efficiency and performance, to accurately discern between declarative statements and interrogative questions.
The model processes input text to determine whether it is a statement or a question.
The model was trained on a diverse dataset containing examples of both statements and questions. The training process involved fine-tuning the pre-trained DistilBERT model on this specific classification task. The dataset included various types of questions and statements from different contexts to ensure robustness.
The performance of the model was evaluated using standard metrics for classification tasks, including accuracy, precision, recall, and F1 score. The results indicate that the model performs well in distinguishing between statements and questions, making it a reliable tool for text classification tasks in natural language processing.
1from transformers import pipeline
2
3# Load the model and tokenizer
4classifier = pipeline("text-classification", model="ilert/SoQbert")
5
6# Example texts
7texts = ["Is it going to rain today?", "It is a sunny day."]
8
9# Classify texts
10results = classifier(texts)
11
12# Output the results
13for text, result in zip(texts, results):
14 print(f"Text: {text}")
15 print(f"Classification: {result['label']}")