pkedzia commited on
Commit
956f40d
1 Parent(s): e18caa1

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +43 -9
README.md CHANGED
@@ -6,23 +6,57 @@ language:
6
  - pl
7
  library_name: transformers
8
  ---
9
- # Model Card for radlab/polish-roberta-large-v2-qa
10
-
11
- <!-- Provide a quick summary of what the model is/does. -->
12
- Question-Answer model for polish.
13
-
14
 
15
  ## Model Details
16
 
17
- ### Model Description
18
-
19
- <!-- Provide a longer summary of what this model is. -->
20
  - **Model name:** `radlab/polish-roberta-large-v2-qa`
21
  - **Developed by:** [radlab.dev](https://radlab.dev)
22
  - **Shared by:** [radlab.dev](https://radlab.dev)
23
  - **Model type:** QA
24
  - **Language(s) (NLP):** PL
25
- - **License:** CCBY4
26
  - **Finetuned from model:** [sdadas/polish-roberta-large-v2](https://huggingface.co/radlab/polish-roberta-large-v2-sts)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
27
 
 
28
 
 
 
 
 
 
 
 
 
 
6
  - pl
7
  library_name: transformers
8
  ---
9
+ # Model Card
10
+ Extractive Question-Answer model for polish. Extractive means, that the most relevant
11
+ chunk of the text is returned as answer from t he context for the given question.
 
 
12
 
13
  ## Model Details
14
 
 
 
 
15
  - **Model name:** `radlab/polish-roberta-large-v2-qa`
16
  - **Developed by:** [radlab.dev](https://radlab.dev)
17
  - **Shared by:** [radlab.dev](https://radlab.dev)
18
  - **Model type:** QA
19
  - **Language(s) (NLP):** PL
20
+ - **License:** CC-BY-4.0
21
  - **Finetuned from model:** [sdadas/polish-roberta-large-v2](https://huggingface.co/radlab/polish-roberta-large-v2-sts)
22
+ - **Maxiumum context size:*** 512 tokens
23
+
24
+ ## Model Usage
25
+
26
+ Simple model usage with huggingface library:
27
+
28
+ ```python
29
+ from transformers import pipeline
30
+
31
+ model_path = "radlab/polish-roberta-large-v2-qa"
32
+
33
+ question_answerer = pipeline(
34
+ "question-answering",
35
+ model=model_path
36
+ )
37
+
38
+ question = "Co będzie w budowanym obiekcie?"
39
+ context = """Pozwolenie na budowę zostało wydane w marcu. Pierwsze prace przygotowawcze
40
+ na terenie przy ul. Wojska Polskiego już się rozpoczęły.
41
+ Działkę ogrodzono, pojawił się również monitoring, a także kontenery
42
+ dla pracowników budowy. Na ten moment nie jest znana lista sklepów,
43
+ które pojawią się w nowym pasażu handlowym."""
44
+
45
+ print(
46
+ question_answerer(
47
+ question=question,
48
+ context=context.replace("\n", " ")
49
+ )
50
+ )
51
+ ```
52
 
53
+ with the sample output:
54
 
55
+ ```json
56
+ {
57
+ 'score': 0.3472374677658081,
58
+ 'start': 259,
59
+ 'end': 268,
60
+ 'answer': ' sklepów,'
61
+ }
62
+ ```