dmmiller612 / bert-extractive-summarizer

Easy to use extractive text summarization with BERT
MIT License
1.39k stars 307 forks source link

cannot import name summarizer #151

Open dcisic opened 1 year ago

dcisic commented 1 year ago

!pip install bert-extractive-summarizer from summarizer import Summarizer,TransformerSummarizer

gives error


ImportError Traceback (most recent call last) ~\AppData\Local\Temp\ipykernel_9976\1836711224.py in 2 #from summarizer import Summarizer 3 #model = Summarizer() ----> 4 from summarizer import Summarizer,TransformerSummarizer 5 import spacy

ImportError: cannot import name 'Summarizer' from 'summarizer' (unknown location)

Anaghdwivedi commented 1 year ago

write this code to separately install the transformer library and then import whatever we want

pip install git+https://github.com/huggingface/transformers pip install git+https://github.com/huggingface/transformers from transformers import Summarization