Update README.md
Browse files
README.md
CHANGED
@@ -326,11 +326,16 @@ Use `textsum` in python with this model:
|
|
326 |
```python
|
327 |
from textsum.summarize import Summarizer
|
328 |
|
329 |
-
summarizer = Summarizer(
|
|
|
|
|
330 |
|
331 |
# summarize a long string
|
332 |
-
out_str = summarizer.summarize_string(
|
333 |
-
|
|
|
|
|
|
|
334 |
```
|
335 |
|
336 |
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.
|
|
|
326 |
```python
|
327 |
from textsum.summarize import Summarizer
|
328 |
|
329 |
+
summarizer = Summarizer(
|
330 |
+
model_name_or_path="pszemraj/long-t5-tglobal-xl-16384-book-summary"
|
331 |
+
)
|
332 |
|
333 |
# summarize a long string
|
334 |
+
out_str = summarizer.summarize_string(
|
335 |
+
"This is a long string of text that will be summarized."
|
336 |
+
)
|
337 |
+
print(f"summary: {out_str}")
|
338 |
+
|
339 |
```
|
340 |
|
341 |
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.
|