pszemraj commited on
Commit
11f6dbc
1 Parent(s): 5cd2205

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +24 -0
README.md CHANGED
@@ -553,6 +553,30 @@ See [train with a script](https://huggingface.co/docs/transformers/run_scripts)
553
 
554
  This model was originally tuned on Google Colab with a heavily modified variant of the [longformer training notebook](https://github.com/patrickvonplaten/notebooks/blob/master/Fine_tune_Longformer_Encoder_Decoder_(LED)_for_Summarization_on_pubmed.ipynb), key enabler being deepspeed. You can try this as an alternate route to fine-tuning the model without using the command line.
555
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
556
  * * *
557
 
558
  ## Training procedure
 
553
 
554
  This model was originally tuned on Google Colab with a heavily modified variant of the [longformer training notebook](https://github.com/patrickvonplaten/notebooks/blob/master/Fine_tune_Longformer_Encoder_Decoder_(LED)_for_Summarization_on_pubmed.ipynb), key enabler being deepspeed. You can try this as an alternate route to fine-tuning the model without using the command line.
555
 
556
+ ### Is there an easier way to use this?
557
+
558
+ I have created a python package utility for this reason. It's called [textsum](https://github.com/pszemraj/textsum), and you can use it to load models and summarize things in a few lines of code.
559
+
560
+ ```sh
561
+ pip install textsum
562
+ ```
563
+
564
+ Use `textsum` in python with this model:
565
+
566
+ ```python
567
+ from textsum.summarize import Summarizer
568
+
569
+ summarizer = Summarizer(model_name_or_path="pszemraj/long-t5-tglobal-base-16384-book-summary")
570
+
571
+ # summarize a long string
572
+ out_str = summarizer.summarize_string('This is a long string of text that will be summarized.')
573
+ print(f'summary: {out_str}')
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.
577
+
578
+ For details, explanations, and docs, see the README (_linked above_) or the [wiki](https://github.com/pszemraj/textsum/wiki).
579
+
580
  * * *
581
 
582
  ## Training procedure