anush-933 / Text_Summarization_for_Youtube-Videos_Using_AssemblyAI

Problem statement 4 - Panel Discussion Summarization
0 stars 0 forks source link

ImportError: cannot import name 'TransformerSummarizer' from 'summarizer' #2

Open Patrikkk opened 1 year ago

Patrikkk commented 1 year ago

When I run textsummarize.py, I get the following error:


  File "H:\GitHub\Text_Summarization_for_Youtube-Videos_Using_AssemblyAI\textsummarizex.py", line 1, in <module>
    from summarizer import TransformerSummarizer
ImportError: cannot import name 'TransformerSummarizer' from 'summarizer' (C:\Users\patri\AppData\Local\Programs\Python\Python310\lib\site-packages\summarizer\__init__.py)```
anush-933 commented 1 year ago

Please install summarize package

On Sat, 24 Dec 2022, 4:19 am Patrikkk, @.***> wrote:

Sorry, my bad. Realized transcribe.py is not meant to be run individually. When I run textsummarize.py, I get the following error:

Traceback (most recent call last): File "H:\GitHub\Text_Summarization_for_Youtube-Videos_Using_AssemblyAI\textsummarizex.py", line 1, in from summarizer import TransformerSummarizer ImportError: cannot import name 'TransformerSummarizer' from 'summarizer' (C:\Users\patri\AppData\Local\Programs\Python\Python310\lib\site-packages\summarizer__init__.py)

— Reply to this email directly, view it on GitHub https://github.com/anush-933/Text_Summarization_for_Youtube-Videos_Using_AssemblyAI/issues/2#issuecomment-1364372200, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATTLXI5DHBJ4IWWINMSSWBLWOYT7FANCNFSM6AAAAAATIDNF74 . You are receiving this because you are subscribed to this thread.Message ID: <anush-933/Text_Summarization_for_Youtube-Videos_Using_AssemblyAI/issues/2/1364372200 @github.com>

Patrikkk commented 1 year ago

Thanks for the reply. I already had summarizer installed when I posted the issue.

PS C:\Windows\system32> pip install summarizer
Requirement already satisfied: summarizer in c:\users\patri\appdata\local\programs\python\python310\lib\site-packages (0.0.7)
Requirement already satisfied: nltk in c:\users\patri\appdata\local\programs\python\python310\lib\site-packages (from summarizer) (3.8)
Requirement already satisfied: tqdm in c:\users\patri\appdata\local\programs\python\python310\lib\site-packages (from nltk->summarizer) (4.64.1)
Requirement already satisfied: regex>=2021.8.3 in c:\users\patri\appdata\local\programs\python\python310\lib\site-packages (from nltk->summarizer) (2022.10.31)
Requirement already satisfied: joblib in c:\users\patri\appdata\local\programs\python\python310\lib\site-packages (from nltk->summarizer) (1.2.0)
Requirement already satisfied: click in c:\users\patri\appdata\local\programs\python\python310\lib\site-packages (from nltk->summarizer) (8.1.3)
Requirement already satisfied: colorama in c:\users\patri\appdata\local\programs\python\python310\lib\site-packages (from click->nltk->summarizer) (0.4.6)
PS C:\Windows\system32>
anush-933 commented 1 year ago

It seems you are running the program files in H: directory. Try to tun in c:\users\patri itself.

anush-933 commented 1 year ago

torch 1.13.0 torchvision 0.14.0 tokenizers 0.13.2 bert-extractive-summarizer 0.10.1 (maybe) huggingface-hub 0.11.1 keybert 0.7.0 uvicorn 0.20.0 Make sure these are installed too

On Sat, Dec 24, 2022 at 8:56 AM Patrikkk @.***> wrote:

Thanks for the reply. I already had summarizer installed when I posted the issue.

PS C:\Windows\system32> pip install summarizer Requirement already satisfied: summarizer in c:\users\patri\appdata\local\programs\python\python310\lib\site-packages (0.0.7) Requirement already satisfied: nltk in c:\users\patri\appdata\local\programs\python\python310\lib\site-packages (from summarizer) (3.8) Requirement already satisfied: tqdm in c:\users\patri\appdata\local\programs\python\python310\lib\site-packages (from nltk->summarizer) (4.64.1) Requirement already satisfied: regex>=2021.8.3 in c:\users\patri\appdata\local\programs\python\python310\lib\site-packages (from nltk->summarizer) (2022.10.31) Requirement already satisfied: joblib in c:\users\patri\appdata\local\programs\python\python310\lib\site-packages (from nltk->summarizer) (1.2.0) Requirement already satisfied: click in c:\users\patri\appdata\local\programs\python\python310\lib\site-packages (from nltk->summarizer) (8.1.3) Requirement already satisfied: colorama in c:\users\patri\appdata\local\programs\python\python310\lib\site-packages (from click->nltk->summarizer) (0.4.6) PS C:\Windows\system32>

— Reply to this email directly, view it on GitHub https://github.com/anush-933/Text_Summarization_for_Youtube-Videos_Using_AssemblyAI/issues/2#issuecomment-1364450904, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATTLXI7NWQ7WOY5SPARE6RTWOZUN5ANCNFSM6AAAAAATIDNF74 . You are receiving this because you commented.Message ID: <anush-933/Text_Summarization_for_Youtube-Videos_Using_AssemblyAI/issues/2/1364450904 @github.com>