ahmedabdelwahed commited on
Commit
9767243
·
1 Parent(s): a6157e6

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +8 -2
README.md CHANGED
@@ -20,10 +20,16 @@ Mojiz is a finetuned MT5 model for Arabic summarization.
20
  <!-- Provide a longer summary of what this model is. -->
21
 
22
 
23
- ## Uses
24
 
25
- <!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
 
 
26
 
 
 
 
 
27
  ### Direct Use
28
 
29
  <!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
 
20
  <!-- Provide a longer summary of what this model is. -->
21
 
22
 
23
+ ## Usage
24
 
25
+ ```python
26
+ from peft import PeftModel, PeftConfig
27
+ from transformers import AutoModelForSeq2SeqLM
28
 
29
+ config = PeftConfig.from_pretrained("ahmedabdelwahed/sft-base-12-epochs")
30
+ model = AutoModelForSeq2SeqLM.from_pretrained("google/mt5-base")
31
+ model = PeftModel.from_pretrained(model, "ahmedabdelwahed/sft-base-12-epochs")
32
+ ```
33
  ### Direct Use
34
 
35
  <!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->