Skip to content

Summarize a video lecture, a text file or an audio file using BART transformer model.

Notifications You must be signed in to change notification settings

NaveedShahid/Lecture-Summarizer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 

Repository files navigation

Lecture-Summarizer

Summarize a live audio lecture, a text file or an audio file using BART transformer model. Keypoints and Keywords are extracted using SIFRank Algorithm

Alt Text

  1. Install linux packages

  2. $ sudo apt-get install ffmpeg
    $ sudo apt-get install poppler-utils

  3. For conda installation(optional):
    $ conda env create -f environment.yml

  4. Install pip packages with
    $ pip install -r requirements.txt
    Change directory to /server and run
    $ python summarizer.py --install True

  5. Run tests for mp3 file
    $ python summarizer.py --audio_file path_to_mp3

  6. Run tests for text file
    $ python summarizer.py --text_file path_to_transcript

  7. Run tests for microphone recording
    $ python summarizer.py --record True

  8. Once the summarizer is working as usual, cd to the client directory and run
    npm install

  9. This command requires node.js installed

  10. After npm install finishes, open a react front-end in the default browser by running
    npm start
    Alt Text

  11. To start the Flask backend, cd to the server directory and run
    python app.py

Alt Text

  1. The server stores the transcripts and summaries in a MongoDB database. Make sure MongoDB is installed. Run
    mongo
    in cmd to start MongoDB server.

Alt Text

  1. Try out the Lecture Summarizer

Note: For summarizing an audio file or live audio, the google API credentials need to be replaced with working ones. More info at GCP Speech-to-text

Note : For now summarizer and other models require large amount of disk space (download on first run 1.63 GB bart model, 483 MB stanford nlp library, 367 MB elmo model, Pytorch and transformers almost 1.5-2 GB) be patient on the first run

Note : Summarizer uses cpu and gpu resources if available (GPU recommended) and memory upto 5 GB when running. atleast 8-12 GB RAM recommended

Note : If GPU is not installed the summarizer will still run but will take upto 5 minutes for a 2 minute audio

Note : For using GPU make sure NVIDIA GPU is installed with drivers and pytorch using
$ pip install torch==1.7.0+cu110 torchvision==0.8.1+cu110 torchaudio===0.7.0 -f https://download.pytorch.org/whl/torch_stable.html

About

Summarize a video lecture, a text file or an audio file using BART transformer model.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published