Update README.md
Browse files
README.md
CHANGED
|
@@ -43,7 +43,7 @@ To load and use the fine-tuned model:
|
|
| 43 |
```python
|
| 44 |
from transformers import AutoModelForSeq2SeqLM, AutoTokenizer
|
| 45 |
|
| 46 |
-
model_name = "
|
| 47 |
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
| 48 |
model = AutoModelForSeq2SeqLM.from_pretrained(model_name)
|
| 49 |
```
|
|
@@ -70,7 +70,7 @@ For a simpler approach:
|
|
| 70 |
```python
|
| 71 |
from transformers import pipeline
|
| 72 |
|
| 73 |
-
summarizer = pipeline("summarization", model="
|
| 74 |
khmer_text = "ααααα»ααΆααΆααααααΆαααααααΆα α‘α¦ ααΆαααΆαα α αΎαααΆααΊααΆαααααααα
αααααα’αΆαααΈα’αΆααααααα"
|
| 75 |
summary = summarizer(khmer_text, max_length=150, min_length=30, do_sample=False)
|
| 76 |
print("πΉ Khmer Summary:", summary[0]['summary_text'])
|
|
@@ -118,13 +118,13 @@ trainer.evaluate()
|
|
| 118 |
## πΎ Saving & Uploading the Model
|
| 119 |
After fine-tuning, the model was uploaded to Hugging Face Hub:
|
| 120 |
```python
|
| 121 |
-
model.push_to_hub("
|
| 122 |
-
tokenizer.push_to_hub("
|
| 123 |
```
|
| 124 |
To download it later:
|
| 125 |
```python
|
| 126 |
-
model = AutoModelForSeq2SeqLM.from_pretrained("
|
| 127 |
-
tokenizer = AutoTokenizer.from_pretrained("
|
| 128 |
```
|
| 129 |
|
| 130 |
---
|
|
|
|
| 43 |
```python
|
| 44 |
from transformers import AutoModelForSeq2SeqLM, AutoTokenizer
|
| 45 |
|
| 46 |
+
model_name = "songhieng/khmer-mt5-summarization"
|
| 47 |
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
| 48 |
model = AutoModelForSeq2SeqLM.from_pretrained(model_name)
|
| 49 |
```
|
|
|
|
| 70 |
```python
|
| 71 |
from transformers import pipeline
|
| 72 |
|
| 73 |
+
summarizer = pipeline("summarization", model="songhieng/khmer-mt5-summarization")
|
| 74 |
khmer_text = "ααααα»ααΆααΆααααααΆαααααααΆα α‘α¦ ααΆαααΆαα α αΎαααΆααΊααΆαααααααα
αααααα’αΆαααΈα’αΆααααααα"
|
| 75 |
summary = summarizer(khmer_text, max_length=150, min_length=30, do_sample=False)
|
| 76 |
print("πΉ Khmer Summary:", summary[0]['summary_text'])
|
|
|
|
| 118 |
## πΎ Saving & Uploading the Model
|
| 119 |
After fine-tuning, the model was uploaded to Hugging Face Hub:
|
| 120 |
```python
|
| 121 |
+
model.push_to_hub("songhieng/khmer-mt5-summarization")
|
| 122 |
+
tokenizer.push_to_hub("songhieng/khmer-mt5-summarization")
|
| 123 |
```
|
| 124 |
To download it later:
|
| 125 |
```python
|
| 126 |
+
model = AutoModelForSeq2SeqLM.from_pretrained("songhieng/khmer-mt5-summarization")
|
| 127 |
+
tokenizer = AutoTokenizer.from_pretrained("songhieng/khmer-mt5-summarization")
|
| 128 |
```
|
| 129 |
|
| 130 |
---
|