readme
Browse files
README.md
CHANGED
@@ -18,6 +18,17 @@ should probably proofread and complete it, then remove this comment. -->
|
|
18 |
**This model relies on a custom modeling file, you need to add trust_remote_code=True**\
|
19 |
**See [\#13467](https://github.com/huggingface/transformers/pull/13467)**
|
20 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
21 |
# ccdv/lsg-bart-base-4096-arxiv
|
22 |
|
23 |
This model is a fine-tuned version of [ccdv/lsg-bart-base-4096](https://huggingface.co/ccdv/lsg-bart-base-4096) on the scientific_papers arxiv dataset. \
|
|
|
18 |
**This model relies on a custom modeling file, you need to add trust_remote_code=True**\
|
19 |
**See [\#13467](https://github.com/huggingface/transformers/pull/13467)**
|
20 |
|
21 |
+
```python
|
22 |
+
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM, pipeline
|
23 |
+
|
24 |
+
tokenizer = AutoTokenizer.from_pretrained("ccdv/lsg-bart-base-4096-arxiv", trust_remote_code=True)
|
25 |
+
model = AutoModelForSeq2SeqLM.from_pretrained("ccdv/lsg-bart-base-4096-arxiv", trust_remote_code=True)
|
26 |
+
|
27 |
+
text = "Replace by what you want."
|
28 |
+
pipe = pipeline("text2text-generation", model=model, tokenizer=tokenizer, device=0)
|
29 |
+
generated_text = pipe(text, truncation=True, max_length=128)
|
30 |
+
```
|
31 |
+
|
32 |
# ccdv/lsg-bart-base-4096-arxiv
|
33 |
|
34 |
This model is a fine-tuned version of [ccdv/lsg-bart-base-4096](https://huggingface.co/ccdv/lsg-bart-base-4096) on the scientific_papers arxiv dataset. \
|