Created
November 10, 2020 18:59
-
-
Save manmohan24nov/791ea0473b268452596b13bddaeb380d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>>> from summarizer import TransformerSummarizer | |
>>> import re | |
>>> GPT2_model = TransformerSummarizer(transformer_type="GPT2",transformer_model_key="gpt2-medium") | |
>>> text = " ".join(comment_section) | |
>>> summerize = ''.join(GPT2_model(text, min_length=60, max_length=120)) | |
>>> summerize | |
'The queen trolls her staff by leaving little bowls of snacks around the palace and marking the level of the snacks with a sharpie. | |
If the snacks dip below that level she starts trolling them about who ate her snacks. | |
The queen has a history of doing exactly that sort of thing in very sly ways.' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment