pip is used from command line, not from within a python script
so run first two lines from command line, and remove from script
then you also need to import bert-extractive-summarizer:
the examples are extensive here: https://github.com/dmmiller612/bert-extr...summarizer
and here for sacremoses: https://github.com/isi-nlp/sacremoses
so run first two lines from command line, and remove from script
then you also need to import bert-extractive-summarizer:
from summarizer import Summarizer
into your scriptthe examples are extensive here: https://github.com/dmmiller612/bert-extr...summarizer
and here for sacremoses: https://github.com/isi-nlp/sacremoses