Instructions to use NYTK/reading-comprehension-hurc-hubert-hungarian with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use NYTK/reading-comprehension-hurc-hubert-hungarian with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("question-answering", model="NYTK/reading-comprehension-hurc-hubert-hungarian")# Load model directly from transformers import AutoTokenizer, AutoModelForQuestionAnswering tokenizer = AutoTokenizer.from_pretrained("NYTK/reading-comprehension-hurc-hubert-hungarian") model = AutoModelForQuestionAnswering.from_pretrained("NYTK/reading-comprehension-hurc-hubert-hungarian", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -26,6 +26,19 @@ For further details, see [our demo site](https://juniper.nytud.hu/demo/nlp).
|
|
| 26 |
| huBERT | 64.50 | 69.03 |
|
| 27 |
| mT5 | 69.51 | 76.26 |
|
| 28 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 29 |
## Citation
|
| 30 |
If you use this model, please cite the following paper:
|
| 31 |
|
|
|
|
| 26 |
| huBERT | 64.50 | 69.03 |
|
| 27 |
| mT5 | 69.51 | 76.26 |
|
| 28 |
|
| 29 |
+
## Usage with pipeline
|
| 30 |
+
|
| 31 |
+
```python
|
| 32 |
+
from transformers import pipeline
|
| 33 |
+
|
| 34 |
+
context = "A kedd hajnalban elhunyt Somló Tamásra emlékezett zenésztársa, Presser Gábor. Somló Tamás nagyszerű egyénisége, énekhangja és éneklési stílusa egészen egyedülálló volt' – fogalmazott. '1968 lehetett, amikor először találkoztunk, gyakorlatilag váltottuk egymást az Omega együttesben. Tamás akkor indult el az artista pályán, miközben zenélt is. Az Omegában csak néhányszor játszottunk együtt, miután én beléptem, ő éveket töltött külföldön artistaként, aztán összefutottunk az LGT-ben, ennek már 43 éve' - idézte fel Presser Gábor. Somló Tamás színpadi jelenléte nagy húzóerőt jelentett a zenekar számára és zenészi képességeit mutatta az is, hogy amikor Frenreisz Károly helyett belépett az LGT-be, néhány hét alatt megtanult basszusgitározni."
|
| 35 |
+
question = "'Nem ismerek olyan embert, aki Tamásra haragudott volna. Életét úgy fejezte be, ahogyan élt: utolsó fellépésére, amely talán egy hónappal ezelőtt lehetett, már nagyon nehezen tudott csak elmenni, de nem mondta le, mert Pécsett egy jótékonysági koncerten játszott beteg gyerekeknek' - mondta [MASK]."
|
| 36 |
+
|
| 37 |
+
qa = pipeline(task="question-answering", model="NYTK/reading-comprehension-hurc-hubert-hungarian")
|
| 38 |
+
|
| 39 |
+
print(qa({"question": question, "context": context})["answer"])
|
| 40 |
+
```
|
| 41 |
+
|
| 42 |
## Citation
|
| 43 |
If you use this model, please cite the following paper:
|
| 44 |
|