Downloads · 30 days
0
shigapov/paraly_camembert_large_multilabel
paraly_camembert_large_multilabel is a machine learning model from shigapov. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as cc-by-4.0.
Multilabel classifier on french sentences with labels "figuratif" and "concret". You can use it with flair-library:
Downloads · 30 days
0
Access
Public
Updated Jan 23, 2025
Repo size
1.3 GB
Likes
1
Public
Click a slice to open those files.
.bin1.3 GB · 100%
From the Hugging Face model README
Multilabel classifier on french sentences with labels "figuratif" and "concret". You can use it with flair-library:
from flair.models import TextClassifier
from flair.data import Sentence
# Load the classifier model
classifier = TextClassifier.load('paraly_camembert_large_multilabel.pt')
# Define the prediction function
def predict(input_text):
sentence = Sentence(input_text)
classifier.predict(sentence)
# Extract the label and confidence into a dictionary format
labels = {label.value: label.score for label in sentence.labels}
return labels
Results:
- F-score (micro) 0.9349
- F-score (macro) 0.9352
- Accuracy 0.8831
By class:
precision recall f1-score support
figuratif 0.9340 0.9340 0.9340 106
concret 0.9672 0.9077 0.9365 65
micro avg 0.9461 0.9240 0.9349 171
macro avg 0.9506 0.9208 0.9352 171
weighted avg 0.9466 0.9240 0.9349 171
samples avg 0.9578 0.9448 0.9437 171