I am facing this issue in python 3.8.11 where the library is getting an error while running a simple program.
first sample code
`
from summarizer import Summarizer
body = 'Text body that you want to summarize with BERT'
body2 = 'Something else you want to summarize with BERT'
model = Summarizer()
print(model(body))
print(model(body2))
`
Error Occured
Traceback (most recent call last): File "bert_summary.py", line 9, in <module> from summarizer import Summarizer File "/home/devpc/anaconda3/lib/python3.8/site-packages/summarizer/__init__.py", line 1, in <module> from summarizer.model_processors import Summarizer, TransformerSummarizer File "/home/devpc/anaconda3/lib/python3.8/site-packages/summarizer/model_processors.py", line 6, in <module> from summarizer.bert_parent import BertParent File "/home/devpc/anaconda3/lib/python3.8/site-packages/summarizer/bert_parent.py", line 9, in <module> class BertParent(object): File "/home/devpc/anaconda3/lib/python3.8/site-packages/summarizer/bert_parent.py", line 21, in BertParent 'albert-base-v1': (AlbertModel, AlbertTokenizer), NameError: name 'AlbertModel' is not defined
I am facing this issue in python 3.8.11 where the library is getting an error while running a simple program.
first sample code
` from summarizer import Summarizer
body = 'Text body that you want to summarize with BERT' body2 = 'Something else you want to summarize with BERT' model = Summarizer() print(model(body)) print(model(body2)) `
Error Occured
Traceback (most recent call last): File "bert_summary.py", line 9, in <module> from summarizer import Summarizer File "/home/devpc/anaconda3/lib/python3.8/site-packages/summarizer/__init__.py", line 1, in <module> from summarizer.model_processors import Summarizer, TransformerSummarizer File "/home/devpc/anaconda3/lib/python3.8/site-packages/summarizer/model_processors.py", line 6, in <module> from summarizer.bert_parent import BertParent File "/home/devpc/anaconda3/lib/python3.8/site-packages/summarizer/bert_parent.py", line 9, in <module> class BertParent(object): File "/home/devpc/anaconda3/lib/python3.8/site-packages/summarizer/bert_parent.py", line 21, in BertParent 'albert-base-v1': (AlbertModel, AlbertTokenizer), NameError: name 'AlbertModel' is not defined