Update README.md
Browse files
README.md
CHANGED
|
@@ -17,6 +17,12 @@ from transformers import AutoTokenizer, AutoModelForDocumentQuestionAnswering
|
|
| 17 |
tokenizer = AutoTokenizer.from_pretrained("impira/layoutlm-document-qa")
|
| 18 |
model = AutoModelForDocumentQuestionAnswering.from_pretrained("impira/layoutlm-document-qa")
|
| 19 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 20 |
from datasets import load_dataset
|
| 21 |
|
| 22 |
ds = load_dataset("sebastiandizon/genius-song-lyrics")
|
|
|
|
| 17 |
tokenizer = AutoTokenizer.from_pretrained("impira/layoutlm-document-qa")
|
| 18 |
model = AutoModelForDocumentQuestionAnswering.from_pretrained("impira/layoutlm-document-qa")
|
| 19 |
|
| 20 |
+
# Load model directly
|
| 21 |
+
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
|
| 22 |
+
|
| 23 |
+
tokenizer = AutoTokenizer.from_pretrained("facebook/bart-large-cnn")
|
| 24 |
+
model = AutoModelForSeq2SeqLM.from_pretrained("facebook/bart-large-cnn")
|
| 25 |
+
|
| 26 |
from datasets import load_dataset
|
| 27 |
|
| 28 |
ds = load_dataset("sebastiandizon/genius-song-lyrics")
|