ukr-models
commited on
Commit
•
24e7efa
1
Parent(s):
cfe2888
Create README.md
Browse files
README.md
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
language:
|
3 |
+
- uk
|
4 |
+
tags:
|
5 |
+
- ukrainian
|
6 |
+
license: mit
|
7 |
+
---
|
8 |
+
## Model Description
|
9 |
+
Fine-tuning of [uk-mt5-base](https://huggingface.co/kravchenko/uk-mt5-base) model on summarization dataset.
|
10 |
+
## How to Use
|
11 |
+
|
12 |
+
```py
|
13 |
+
from transformers import AutoTokenizer, T5ForConditionalGeneration, pipeline
|
14 |
+
|
15 |
+
tokenizer = AutoTokenizer.from_pretrained('ukr-models/uk-summarizer')
|
16 |
+
model = T5ForConditionalGeneration.from_pretrained('ukr-models/uk-summarizer')
|
17 |
+
|
18 |
+
ppln = pipeline("summarization", model=model, tokenizer=tokenizer, device=0, max_length=128, num_beams=4, no_repeat_ngram_size=2, clean_up_tokenization_spaces=True)
|
19 |
+
|
20 |
+
text = "..."
|
21 |
+
ppln(text)
|
22 |
+
```
|