polish-qa-v2 / README.md
pkedzia's picture
Update README.md
956f40d
|
raw
history blame
1.55 kB
metadata
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 Usage

Simple model usage with huggingface library:

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:

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