pedramyazdipoor
commited on
Commit
•
fe1a154
1
Parent(s):
9533e9d
Update README.md
Browse files
README.md
CHANGED
@@ -49,6 +49,11 @@ path = 'pedramyazdipoor/persian_xlm_roberta_large'
|
|
49 |
tokenizer = AutoTokenizer.from_pretrained(path)
|
50 |
model = AutoModelForQuestionAnswering.from_pretrained(path)
|
51 |
```
|
|
|
|
|
|
|
|
|
|
|
52 |
|
53 |
```python
|
54 |
def generate_indexes(start_logits, end_logits, N, min_index_list):
|
|
|
49 |
tokenizer = AutoTokenizer.from_pretrained(path)
|
50 |
model = AutoModelForQuestionAnswering.from_pretrained(path)
|
51 |
```
|
52 |
+
## Inference
|
53 |
+
There are some considerations for inference:
|
54 |
+
1) Start index of answer must be smaller than end index.
|
55 |
+
2) The span of answer must be within the context.
|
56 |
+
3) The selected span must be the most probable choice among N pairs of candidates.
|
57 |
|
58 |
```python
|
59 |
def generate_indexes(start_logits, end_logits, N, min_index_list):
|