anakin87 commited on
Commit
39f3860
1 Parent(s): 795b8cc

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +32 -3
README.md CHANGED
@@ -119,7 +119,7 @@ It can be used for [Extractive Q&A](https://huggingface.co/tasks/question-answer
119
 
120
  [Evaluation notebook](https://github.com/anakin87/electra-italian-xxl-cased-squad-it/blob/main/evaluation.ipynb)
121
 
122
- ## Usage in Transformers 🚀
123
  Model checkpoints are available for usage in Pytorch. They can be used directly with pipelines as:
124
 
125
  ```python
@@ -131,7 +131,33 @@ qa(question="Qual è il soprannome di Vasco Rossi?", context="Vasco Rossi, noto
131
  ```
132
  ## Usage in Haystack 🚀🚀🚀
133
 
134
- TO DO: link notebook
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
135
 
136
  ## Comparison ⚖️
137
 
@@ -159,4 +185,7 @@ TO DO: link notebook
159
  - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
160
  - lr_scheduler_type: linear
161
  - num_epochs: 2
162
- - mixed_precision_training: Native AMP
 
 
 
 
119
 
120
  [Evaluation notebook](https://github.com/anakin87/electra-italian-xxl-cased-squad-it/blob/main/evaluation.ipynb)
121
 
122
+ ## Usage in Transformers 🤗
123
  Model checkpoints are available for usage in Pytorch. They can be used directly with pipelines as:
124
 
125
  ```python
 
131
  ```
132
  ## Usage in Haystack 🚀🚀🚀
133
 
134
+ With the [Haystack NLP framework](https://github.com/deepset-ai/haystack), you can use this model and create a scalable Question Answering system that works across millions of documents.
135
+
136
+ For a complete walkthrough, see [this notebook](https://github.com/anakin87/electra-italian-xxl-cased-squad-it/blob/main/usage_in_haystack.ipynb).
137
+
138
+ ```python
139
+ ...
140
+ print_answers(prediction, details="medium")
141
+
142
+ >>> Query: Con chi ha parlato di vaccini il premier Mario Draghi?
143
+ Answers:
144
+ [ { 'answer': 'Von der Leyen',
145
+ 'context': " vaccino dell'azienda britannica. Durante la telefonata "
146
+ 'tra Draghi e Von der Leyen, la presidente della '
147
+ 'Commissione Ue ha annunciato al presidente del',
148
+ 'score': 0.9663902521133423},
149
+ { 'answer': 'Ursula Von der Leyen',
150
+ 'context': 'colloquio telefonico con la presidente della Commissione '
151
+ 'europea Ursula Von der Leyen. Secondo fonti di Palazzo '
152
+ 'Chigi, dalla conversazione è emerso ch',
153
+ 'score': 0.9063920974731445},
154
+ { 'answer': 'Mario Draghi, ha tenuto un lungo discorso alla 76esima '
155
+ 'Assemblea Generale delle Nazioni Unite',
156
+ 'context': 'Il presidente del Consiglio, Mario Draghi, ha tenuto un '
157
+ 'lungo discorso alla 76esima Assemblea Generale delle '
158
+ 'Nazioni Unite, nella notte italiana. Tant',
159
+ 'score': 0.5243796706199646}]
160
+ ```
161
 
162
  ## Comparison ⚖️
163
 
 
185
  - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
186
  - lr_scheduler_type: linear
187
  - num_epochs: 2
188
+ - mixed_precision_training: Native AMP
189
+
190
+ > Created by [Stefano Fiorucci/anakin87](https://github.com/anakin87)
191
+ > Made with <span style="color: #e25555;">&hearts;</span> in Italy