polish-qa-v2 / README.md
pkedzia's picture
Update README.md
0e19b83
|
raw
history blame
No virus
1.55 kB
---
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 the 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,'
}
```