Open avinash-550 opened 4 years ago
@Viwarrior Try these in sequence
pip install torch==1.6.0+cpu torchvision==0.7.0+cpu -f https://download.pytorch.org/whl/torch_stable.html
Then
pip install bert-extractive-summarizer==0.4.2
( or )
pip install bert-extractive-summarizer==0.5.0
Then in import try these two lines
import torch
from summarizer import Summarizer
Everything should work fine :)
@Ad1tyaV It is still giving the same error for me. Kindly help.
@Ad1tyaV Do you know another solution for the same? I'm facing the same difficulty
@Taneesha-creates Yes that solution seems to be incompatible now, it worked back then, but based on python version, the package versions need to be tweaked a little bit, try this, I used this for reference
Do you get the same error if you run TransformerSummarizer?
As in:
from summarizer import TransformerSummarizer
If this throws an import error, then it is likely that another package is installed with the summarizer package.
Hi guys. Any update on this?
I have tried pip3 install bert-extractive-summarizer
then
pip3 install summarize
but none of these work
I also triedfrom summarizer import TransformerSummarizer
but it didn't work with TransformerSummarizer (not recognized)
Any suggestion?
You definitely don't want to pip install summarize. That is a different library, and it is overriding the bert-extractive-summarizer library. If from summarizer import TransformerSummarizer
that means that you have another summarizer library installed.
I have the same issue TypeError: 'Summarizer' object is not callable, did someone found a solution? I am not able to use Summarizer because of that, even when installing bert-extractive-summarizer as suggested here...
what happens when you try: from summarizer import TransformerSummarizer
I get a ImportError: cannot import name 'TransformerSummarizer' from 'summarizer' (C:\Users\glom\AppData\Local\Programs\Python\Python310\lib\site-packages\summarizer__init__.py)
Also, for some reason I am not able to install bert-extractive-summarizer anymore (I get a Failed to build tokenizers error) but it might not be related.
the error most likely means you already have a package called summarizer installed. For the latter error, I am not sure. Would have to see full error message.
Hi here,
I am sure I do not have summarizer but bert-extractive-summarizer installed.
Still, haven't been successful, I get the error:
ModuleNotFoundError: No module named 'summarizer'
I ran
from summarizer import TransformerSummarizer
and get the same error
Any help is appreciated.
Hi @claudiaor I am facing the same issue. Were you able to resolve this? Would really appreciate your help.
Hey, I have been facing the same issue. Has there been a found solution or way in which I can bypass using this package to still get an extractive summary?
Do all package installations on the desired project path in terminal and try these , also check venv is activated
import torch
from summarizer.bert import Summarizer
worked for me :)
@soja735 thank you, works for me too and you do not need to import torch.
from summarizer.bert import Summarizer
only works perfectly.
from summarizer import Summarizer
model = Summarizer()
No problem in running above two linesresult = model(a, min_length=60)
When I run this it says:'Summarizer' object is not callable