gabrielnkl commited on
Commit
7c5b778
·
verified ·
1 Parent(s): ce577c7

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +25 -28
README.md CHANGED
@@ -1,46 +1,42 @@
1
  ---
2
- tags:
3
- - text-classification
4
- - sentiment-analysis
5
- - imdb
6
- - distilbert
 
7
  ---
8
 
9
- # 📢 DistilBERT Fine-Tuned para Análise de Sentimentos 🎭
10
 
11
- Este modelo é uma versão **DistilBERT** fine-tuned para **análise de sentimentos** em textos de avaliações de filmes. Ele classifica textos como **positivos** ou **negativos** com alta precisão.
12
 
13
  ## 📖 Dataset
14
 
15
- O modelo foi treinado no dataset [IMDb](https://huggingface.co/datasets/imdb), contendo **50.000 avaliações de filmes** balanceadas entre rótulos positivos e negativos.
16
-
17
- ## 📊 Avaliação
18
-
19
- A performance do modelo foi avaliada em um conjunto de teste com **25.000 avaliações**, obtendo os seguintes resultados:
20
-
21
- | Métrica | Valor |
22
- |----------------|-------|
23
- | **Acurácia** | 93.2% |
24
- | **Precisão** | 93% |
25
- | **Recall** | 93% |
26
- | **F1-score** | 93% |
27
 
28
- Essas métricas indicam que o modelo consegue prever corretamente avaliações de filmes na maioria dos casos.
29
 
30
- ## 📊 Matriz de Confusão
31
 
32
- A matriz de confusão abaixo mostra o desempenho do modelo nas previsões:
 
 
 
 
 
33
 
34
- ![Matriz de Confusão](https://huggingface.co/gabrielnkl/fine-tuned-bert/resolve/main/matriz_confusao.png)
35
 
 
36
 
 
37
 
 
38
 
39
- ## 🚀 Como Usar
40
-
41
- Para utilizar o modelo, basta carregar com `transformers` e usar o pipeline de classificação de texto:
42
-
43
 
 
44
 
45
  ```python
46
  from transformers import pipeline
@@ -49,12 +45,13 @@ model_name = "gabrielnkl/fine-tuned-bert"
49
 
50
  classifier = pipeline("text-classification", model=model_name)
51
 
52
- text = "Esse filme foi incrível! Gostei muito das atuações e do enredo."
53
  result = classifier(text)
54
 
55
  print(result)
56
  # [{'label': 'POSITIVE', 'score': 0.98}]
57
 
 
58
  O notebook usado para treinar este modelo está disponível no GitHub:
59
 
60
  (https://github.com/Gabrielnkl/fine-tuned-bert-model/blob/main/finetuning.py)
 
1
  ---
2
+ tags:
3
+ - text-classification
4
+ - sentiment-analysis
5
+ - imdb
6
+ - distilbert
7
+
8
  ---
9
 
10
+ # 📢 DistilBERT Fine-Tuned for Sentiment Analysis 🎭
11
 
12
+ This model is a **fine-tuned DistilBERT** for **sentiment analysis** on movie review texts. It classifies texts as **positive** or **negative** with high accuracy.
13
 
14
  ## 📖 Dataset
15
 
16
+ The model was trained on the [IMDb](https://huggingface.co/datasets/imdb) dataset, which contains **50,000 movie reviews** balanced between positive and negative labels.
 
 
 
 
 
 
 
 
 
 
 
17
 
18
+ ## 📊 Evaluation
19
 
20
+ The model's performance was evaluated on a test set of **25,000 reviews**, achieving the following results:
21
 
22
+ | Metric | Value |
23
+ |---------------|-------|
24
+ | **Accuracy** | 93.2% |
25
+ | **Precision** | 93% |
26
+ | **Recall** | 93% |
27
+ | **F1-score** | 93% |
28
 
29
+ These metrics indicate that the model correctly predicts movie reviews in most cases.
30
 
31
+ ## 📊 Confusion Matrix
32
 
33
+ The confusion matrix below shows the model's performance on predictions:
34
 
35
+ ![Confusion Matrix](https://huggingface.co/gabrielnkl/fine-tuned-bert/resolve/main/matriz_confusao.png)
36
 
37
+ ## 🚀 How to Use
 
 
 
38
 
39
+ To use the model, simply load it with `transformers` and use the text classification pipeline:
40
 
41
  ```python
42
  from transformers import pipeline
 
45
 
46
  classifier = pipeline("text-classification", model=model_name)
47
 
48
+ text = "This movie was amazing! I really liked the acting and the storyline."
49
  result = classifier(text)
50
 
51
  print(result)
52
  # [{'label': 'POSITIVE', 'score': 0.98}]
53
 
54
+
55
  O notebook usado para treinar este modelo está disponível no GitHub:
56
 
57
  (https://github.com/Gabrielnkl/fine-tuned-bert-model/blob/main/finetuning.py)