jolenechong
commited on
Commit
•
3c46b8e
1
Parent(s):
c88b3ed
Update README.md
Browse files
README.md
CHANGED
@@ -47,10 +47,10 @@ Try out the model with the code below :D
|
|
47 |
from peft import PeftModel, PeftConfig
|
48 |
from transformers import AutoModelForSeq2SeqLM, AutoTokenizer
|
49 |
|
50 |
-
config = PeftConfig.from_pretrained("jolenechong/lora-bart-
|
51 |
-
model = AutoModelForSeq2SeqLM.from_pretrained("
|
52 |
-
model = PeftModel.from_pretrained(model, "jolenechong/lora-bart-
|
53 |
-
tokenizer = AutoTokenizer.from_pretrained("jolenechong/lora-bart-
|
54 |
|
55 |
text = """[add transcript you want to summarize here]"""
|
56 |
inputs = tokenizer(text, return_tensors="pt")
|
|
|
47 |
from peft import PeftModel, PeftConfig
|
48 |
from transformers import AutoModelForSeq2SeqLM, AutoTokenizer
|
49 |
|
50 |
+
config = PeftConfig.from_pretrained("jolenechong/lora-bart-cnn-tib-1024")
|
51 |
+
model = AutoModelForSeq2SeqLM.from_pretrained("facebook/bart-large-cnn")
|
52 |
+
model = PeftModel.from_pretrained(model, "jolenechong/lora-bart-cnn-tib-1024")
|
53 |
+
tokenizer = AutoTokenizer.from_pretrained("jolenechong/lora-bart-cnn-tib-1024", from_pt=True)
|
54 |
|
55 |
text = """[add transcript you want to summarize here]"""
|
56 |
inputs = tokenizer(text, return_tensors="pt")
|