dmmiller612 / bert-extractive-summarizer

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

i have a problem when importing summarizer ---""""from summarizer import Summarizer""" #92

Closed KevinLion15 closed 3 years ago

KevinLion15 commented 3 years ago

this is the message they give me None of PyTorch, TensorFlow >= 2.0, or Flax have been found. Models won't be available and only tokenizers, configuration and file/data utilities can be used. Traceback (most recent call last): File "C:/Users/klion/AppData/Local/Programs/Python/Python39/test.py", line 1, in from summarizer import Summarizer File "C:\Users\klion\AppData\Local\Programs\Python\Python39\lib\site-packages\summarizer__init__.py", line 1, in from summarizer.model_processors import Summarizer, TransformerSummarizer File "C:\Users\klion\AppData\Local\Programs\Python\Python39\lib\site-packages\summarizer\model_processors.py", line 6, in from summarizer.bert_parent import BertParent File "C:\Users\klion\AppData\Local\Programs\Python\Python39\lib\site-packages\summarizer\bert_parent.py", line 4, in import torch ModuleNotFoundError: No module named 'torch'

KevinLion15 commented 3 years ago

Hello can you help me please

dmmiller612 commented 3 years ago

From the error, it looks like pytorch isn't installed. You will need to install pytorch to use bert-extractive-summarizer

Ayush1702 commented 3 years ago

pip install torchvision --user should help

dmmiller612 commented 3 years ago

If you are having any other issues, feel free to re-open.

adarshcode28 commented 2 years ago

Traceback (most recent call last): File "d:\btech\3-YEAR\sem-6\NLP\project\extractive\bert-extractive-summarizer-master\examples\summarize.py", line 1, in from summarizer import Summarizer ImportError: cannot import name 'Summarizer' from 'summarizer' (unknown location)

adarshcode28 commented 2 years ago

please need help

kuluu6 commented 2 years ago

pip install summarizer