![]() ![]() You can directly pass the name of the model to use to pipeline(): “French” and “text-classification” gives back a suggestion “nlptown/bert-base-multilingual-uncased-sentiment”. The model hub that gathers models pretrained on a lot of data by research labs, butĪlso community models (usually fine-tuned versions of those big models on a specific dataset). Let’s say we want to use another model for instance, one that has been trained on French data. It uses the DistilBERT architecture and has been fine-tuned on aĭataset called SST-2 for the sentiment analysis task. You can see the second sentence has been classified as negative (it needs to be positive or negative) but its score isīy default, the model downloaded for this pipeline is called “distilbert-base-uncased-finetuned-sst-2-english”. print ( f "label: " ) label: POSITIVE, with score: 0.9998 label: NEGATIVE, with score: 0.5309 ![]() ![]() > results = classifier () > for result in results. Getting started on a task with a pipeline. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |