dmmiller612 / bert-extractive-summarizer

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

No module named summarizer #30

Closed louiswang524 closed 2 years ago

louiswang524 commented 4 years ago

when i run 'from summarizer import Summarizer', there is an error said no module names summarizer.

dmmiller612 commented 4 years ago

Make sure that you use pip install bert-extractive-summarizer rather than just summarizer (or make sure it isn't already installed). A lot of people have had issues with that. I may rename the base package in a future release.

Mozoku commented 4 years ago

That still does not solve the problem. Still getting the same error

dmmiller612 commented 4 years ago

A good way to test is using the docker image, or starting a virtualenv from scratch. This has been common issue for a lot of people, and when I get time, I will probably change the package name.

zhenyuan0502 commented 3 years ago

I got the error too, any update @dmmiller612 ?

shreya-singh-tech commented 3 years ago

Is there any update on this ? I am unable to import summarizer too

dmmiller612 commented 3 years ago

This has to do with clashing package names at installation. If you set up a virtualenv from scratch or run the docker image, you should not encounter this issue.

shreya-singh-tech commented 3 years ago

I set up a completely new environment a did all the steps, still the same issue. Could you specify if there is a specific version of the prerequisite packages?

amodi01 commented 3 years ago

I am also facing a similar issue.

Ayush1702 commented 3 years ago

uninstall the default summarizer package if it was installed explicitly before, Just upgrade Bert extractive summarizer with pip install --upgrade bert-extractive-summarizer import it and call, it should download a newer model

import torch
from summarizer import Summarizer
model = Summarizer()

This worked for me!

chrome_322

ghost commented 2 years ago

I am also facing a similar issue.

ThePipsPlug commented 2 years ago

Me too, has anyone managed to find a solution

Mahesh100 commented 1 year ago

Facing same issue, tried everything. Any solution on this?