Update README.md
Browse files
README.md
CHANGED
@@ -566,11 +566,16 @@ Use `textsum` in python with this model:
|
|
566 |
```python
|
567 |
from textsum.summarize import Summarizer
|
568 |
|
569 |
-
summarizer = Summarizer(
|
|
|
|
|
570 |
|
571 |
# summarize a long string
|
572 |
-
out_str = summarizer.summarize_string(
|
573 |
-
|
|
|
|
|
|
|
574 |
```
|
575 |
|
576 |
This package provides easy-to-use interfaces for using summarization models on text documents of arbitrary length. Currently implemented interfaces include a python API, CLI, and a shareable demo app.
|
|
|
566 |
```python
|
567 |
from textsum.summarize import Summarizer
|
568 |
|
569 |
+
summarizer = Summarizer(
|
570 |
+
model_name_or_path="pszemraj/long-t5-tglobal-xl-16384-book-summary"
|
571 |
+
)
|
572 |
|
573 |
# summarize a long string
|
574 |
+
out_str = summarizer.summarize_string(
|
575 |
+
"This is a long string of text that will be summarized."
|
576 |
+
)
|
577 |
+
print(f"summary: {out_str}")
|
578 |
+
|
579 |
```
|
580 |
|
581 |
This package provides easy-to-use interfaces for using summarization models on text documents of arbitrary length. Currently implemented interfaces include a python API, CLI, and a shareable demo app.
|