philschmid HF staff commited on
Commit
842f2b4
1 Parent(s): f5910f4

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +27 -1
README.md CHANGED
@@ -1 +1,27 @@
1
- # Pytorch Fork of [tblard/tf-allocine](https://huggingface.co/tblard/tf-allocine)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language: fr
3
+ ---
4
+ # Pytorch Fork of [tblard/tf-allocine](https://huggingface.co/tblard/tf-allocine)
5
+
6
+ A french sentiment analysis model, based on [CamemBERT](https://camembert-model.fr/), and finetuned on a large-scale dataset scraped from [Allociné.fr](http://www.allocine.fr/) user reviews.
7
+ ## Results
8
+ | Validation Accuracy | Validation F1-Score | Test Accuracy | Test F1-Score |
9
+ |--------------------:| -------------------:| -------------:|--------------:|
10
+ | 97.39 | 97.36 | 97.44 | 97.34 |
11
+ The dataset and the evaluation code are available on [this repo](https://github.com/TheophileBlard/french-sentiment-analysis-with-bert).
12
+ ## Usage
13
+ ```python
14
+ from transformers import AutoTokenizer, TFAutoModelForSequenceClassification
15
+ from transformers import pipeline
16
+ tokenizer = AutoTokenizer.from_pretrained("tblard/tf-allocine")
17
+ model = TFAutoModelForSequenceClassification.from_pretrained("tblard/tf-allocine")
18
+ nlp = pipeline('sentiment-analysis', model=model, tokenizer=tokenizer)
19
+ print(nlp("Alad'2 est clairement le meilleur film de l'année 2018.")) # POSITIVE
20
+ print(nlp("Juste whoaaahouuu !")) # POSITIVE
21
+ print(nlp("NUL...A...CHIER ! FIN DE TRANSMISSION.")) # NEGATIVE
22
+ print(nlp("Je m'attendais à mieux de la part de Franck Dubosc !")) # NEGATIVE
23
+ ```
24
+ ## Author
25
+ Théophile Blard – :email: theophile.blard@gmail.com
26
+ If you use this work (code, model or dataset), please cite as:
27
+ > Théophile Blard, French sentiment analysis with BERT, (2020), GitHub repository, <https://github.com/TheophileBlard/french-sentiment-analysis-with-bert>