Downloads · 30 days
0
0% of all-time downloads
tferhan/Intent-GovMa-v1
Intent-GovMa-v1 is a text classification model from tferhan. Use it when you need a label for a piece of text. It is set up for transformers. The card lists the license as apache-2.0.
This model is fine-tuned from the camembert-base model and is designed to classify user intent questions for the website data.gov.ma in French. It can distinguish whether a user is making a general inquiry or requesti…
Downloads · 30 days
0
0% of all-time downloads
All-time downloads
5
Public
Repo size
5 MB
Likes
0
Public
Click a slice to open those files.
.safetensors4.1 MB · 56%
From the Hugging Face model README
This model is fine-tuned from the camembert-base model and is designed to classify user intent
questions for the website data.gov.ma in French. It can distinguish whether a user is making a general inquiry
or requesting specific data. The training data was generated using GPT-4o-mini and includes information specific
to data.gov.ma. The model was fine-tuned using LoRA with specific hyperparameters, achieving an accuracy of up to 0.98.
The model can be directly used to classify user intents in chatbot scenarios for the website data.gov.ma, distinguishing between general inquiries and data requests.
The model is particularly suited for applications involving the French language and can be integrated into larger chatbot systems or fine-tuned further for similar tasks in different contexts.
Use the code snippet below to get started with the model:
from transformers import AutoModelForSequenceClassification, AutoTokenizer, pipeline
import torch
from peft import AutoPeftModelForSequenceClassification
model_name = "tferhan/Intent-GovMa-v1"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoPeftModelForSequenceClassification.from_pretrained(model_name)
nlp_pipeline = pipeline("text-classification", model=model, tokenizer=tokenizer, device=0 if torch.cuda.is_available() else -1)
questions = ["qu'est ce que open data", "je veux les informations de l'eau potable"]
results = nlp_pipeline_class(questions)
for result in results:
print(result)
#{'label': 'LABEL_0', 'score': 0.9999700784683228} === general
#{'label': 'LABEL_1', 'score': 0.9994990825653076} === request_data
10442e-5epoch0.01log_history.json