dmmiller612 / bert-extractive-summarizer

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

AttributeError: module 'transformers.utils.logging' has no attribute 'basicConfig' #112

Closed lazarinastoy closed 2 years ago

lazarinastoy commented 2 years ago

Getting this error when trying to import from summarizer import Summarizer

Log below:

from summarizer import Summarizer from summarizer.model_processors import Summarizer, TransformerSummarizer from summarizer.bert_parent import BertParent logging.basicConfig(level=logging.WARNING) AttributeError: module 'transformers.utils.logging' has no attribute 'basicConfig'

dmmiller612 commented 2 years ago

Newest version of bert-extractive-summarizer should resolve this issue. Feel free to reopen, if it still persists.

mishra011 commented 3 weeks ago

I was also facing the same issue while running

from transformers import pipeline
text_gen_pipeline = pipeline("text-generation")

It got fixed when I installed different transformers version and it worked for me. Below version worked for me.

pip install transformers==4.40.0