songhieng commited on
Commit
f91ee24
Β·
verified Β·
1 Parent(s): c2668f6

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +6 -6
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 = "your-username/khmer-mt5-summarization"
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="your-username/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,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("your-username/khmer-mt5-summarization")
122
- tokenizer.push_to_hub("your-username/khmer-mt5-summarization")
123
  ```
124
  To download it later:
125
  ```python
126
- model = AutoModelForSeq2SeqLM.from_pretrained("your-username/khmer-mt5-summarization")
127
- tokenizer = AutoTokenizer.from_pretrained("your-username/khmer-mt5-summarization")
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
  ---