rhaymison commited on
Commit
d05544e
·
verified ·
1 Parent(s): 7a71608

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +24 -12
README.md CHANGED
@@ -11,25 +11,35 @@ model-index:
11
  <!-- This model card has been generated automatically according to the information the Trainer had access to. You
12
  should probably proofread and complete it, then remove this comment. -->
13
 
14
- # finetune-BERT-squad
15
 
16
- This model is a fine-tuned version of [neuralmind/bert-base-portuguese-cased](https://huggingface.co/neuralmind/bert-base-portuguese-cased) on an unknown dataset.
17
- It achieves the following results on the evaluation set:
18
- - Loss: 1.0687
19
-
20
- ## Model description
21
 
22
- More information needed
23
 
24
- ## Intended uses & limitations
 
25
 
26
- More information needed
27
 
28
- ## Training and evaluation data
 
 
 
 
 
 
 
29
 
30
- More information needed
 
 
 
 
31
 
32
- ## Training procedure
 
 
33
 
34
  ### Training hyperparameters
35
 
@@ -42,6 +52,8 @@ The following hyperparameters were used during training:
42
  - lr_scheduler_type: linear
43
  - num_epochs: 2
44
 
 
 
45
  ### Training results
46
 
47
  | Training Loss | Epoch | Step | Validation Loss |
 
11
  <!-- This model card has been generated automatically according to the information the Trainer had access to. You
12
  should probably proofread and complete it, then remove this comment. -->
13
 
14
+ # bert-squad-portuguese
15
 
16
+ This model aims to help reduce the need for models in Portuguese.
 
 
 
 
17
 
18
+ ## How to use:
19
 
20
+ ```python
21
+ from transformers import AutoModelForQuestionAnswering, AutoTokenizer, pipeline
22
 
23
+ model_name = "rhaymison/bert-squad-portuguese"
24
 
25
+ # a) Get predictions
26
+ nlp = pipeline('question-answering', model=model_name, tokenizer=model_name)
27
+ QA_input = {
28
+ 'question': 'Onde Cristiano Ronaldo começou sua carreira ?',
29
+ 'context': 'Cristiano Ronaldo é jogador de futebol considerado por muitos um dos melhores de todos os tempos. Português, começou a carreira no Sporting e já atuou por Manchester United, Real Madrid, Juventus e Al-Nassr. Foi cinco vezes campeão da Liga dos Campeões da Europa. Também foi campeão da Eurocopa com Portugal no que é considerado o maior título já conquistado pela equipe portuguesa. Disputou cinco Copas do Mundo. Atualmente, é o atleta com mais gols marcados por seleções nacionais.'
30
+ }
31
+ res = nlp(QA_input)
32
+ ```
33
 
34
+ If you need load model and tokenizer
35
+ ```python
36
+ model = AutoModelForQuestionAnswering.from_pretrained(model_name)
37
+ tokenizer = AutoTokenizer.from_pretrained(model_name)
38
+ ```
39
 
40
+ This model is a fine-tuned version of [neuralmind/bert-base-portuguese-cased](https://huggingface.co/neuralmind/bert-base-portuguese-cased) on an unknown dataset.
41
+ It achieves the following results on the evaluation set:
42
+ - Loss: 1.0687
43
 
44
  ### Training hyperparameters
45
 
 
52
  - lr_scheduler_type: linear
53
  - num_epochs: 2
54
 
55
+ GPU: T4
56
+
57
  ### Training results
58
 
59
  | Training Loss | Epoch | Step | Validation Loss |