File size: 1,552 Bytes
65445e0
 
212143f
 
 
 
 
9d023c5
956f40d
 
 
9d023c5
 
 
d6070f3
9d023c5
 
 
 
956f40d
9d023c5
956f40d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9d023c5
956f40d
9d023c5
956f40d
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
---
license: cc-by-4.0
datasets:
- clarin-pl/poquad
language:
- pl
library_name: transformers
---
# Model Card
Extractive Question-Answer model for polish.  Extractive means, that the most relevant 
chunk of the text is returned as answer from t he context for the given question.

## Model Details

- **Model name:** `radlab/polish-roberta-large-v2-qa`
- **Developed by:** [radlab.dev](https://radlab.dev)
- **Shared by:** [radlab.dev](https://radlab.dev)
- **Model type:** QA
- **Language(s) (NLP):** PL
- **License:** CC-BY-4.0
- **Finetuned from model:** [sdadas/polish-roberta-large-v2](https://huggingface.co/radlab/polish-roberta-large-v2-sts)
- **Maxiumum context size:*** 512 tokens

## Model Usage

Simple model usage with huggingface library:

```python
from transformers import pipeline

model_path = "radlab/polish-roberta-large-v2-qa"

question_answerer = pipeline(
  "question-answering",
  model=model_path
)

question = "Co b臋dzie w budowanym obiekcie?"
context = """Pozwolenie na budow臋 zosta艂o wydane w marcu. Pierwsze prace przygotowawcze
na terenie przy ul. Wojska Polskiego ju偶 si臋 rozpocz臋艂y.
Dzia艂k臋 ogrodzono, pojawi艂 si臋 r贸wnie偶 monitoring, a tak偶e kontenery
dla pracownik贸w budowy. Na ten moment nie jest znana lista sklep贸w,
kt贸re pojawi膮 si臋 w nowym pasa偶u handlowym."""

print(
  question_answerer(
    question=question,
    context=context.replace("\n", " ")
  )
)
```

with the sample output:

```json
{
  'score': 0.3472374677658081, 
  'start': 259, 
  'end': 268, 
  'answer': ' sklep贸w,'
}
```