pierreguillou commited on
Commit
6c7bba0
1 Parent(s): 2b3d21b

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +22 -1
README.md CHANGED
@@ -46,7 +46,7 @@ f1 = 82.50
46
  exact match = 70.49
47
  ```
48
 
49
- ## How to use the model
50
 
51
  ```python
52
  import transformers
@@ -77,6 +77,27 @@ print(f"Answer: '{result['answer']}', score: {round(result['score'], 4)}, start:
77
  # Answer: '1 de dezembro de 2019', score: 0.713, start: 328, end: 349
78
  ```
79
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
80
  ## Limitations and bias
81
 
82
  The training data used for this model come from Portuguese SQUAD. It could contain a lot of unfiltered content, which is far from neutral, and biases.
 
46
  exact match = 70.49
47
  ```
48
 
49
+ ## How to use the model... with Pipeline
50
 
51
  ```python
52
  import transformers
 
77
  # Answer: '1 de dezembro de 2019', score: 0.713, start: 328, end: 349
78
  ```
79
 
80
+ ## How to use the model... with the Auto classes
81
+
82
+ ```python
83
+ from transformers import AutoTokenizer, AutoModelForQuestionAnswering
84
+
85
+ tokenizer = AutoTokenizer.from_pretrained("pierreguillou/bert-base-cased-squad-v1.1-portuguese")
86
+ model = AutoModelForQuestionAnswering.from_pretrained("pierreguillou/bert-base-cased-squad-v1.1-portuguese")
87
+ ```
88
+
89
+ Or just clone the model repo:
90
+
91
+ ```python
92
+ git lfs install
93
+ git clone https://huggingface.co/pierreguillou/bert-base-cased-squad-v1.1-portuguese
94
+
95
+ # if you want to clone without large files – just their pointers
96
+ # prepend your git clone with the following env var:
97
+
98
+ GIT_LFS_SKIP_SMUDGE=1
99
+ ```
100
+
101
  ## Limitations and bias
102
 
103
  The training data used for this model come from Portuguese SQUAD. It could contain a lot of unfiltered content, which is far from neutral, and biases.