You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Or simply copy & paste API key inside the API_KEY file if your are window user
Change directory to previous one
cd ..
Create a Virtual Environment for this project
python3 -m venv env
Activate the Virtual Environment
On Window
env\Scripts\activate.bat
On Linux & Mac OS
source env/bin/activate
Install all the dependencies using requirements.txt file
pip install -r requirements.txt
Instruction for using Python CLI tool for summarization
Change directory to the Ekatra-Hackathon Folder
cd Ekatra-Hackathon
Types of Input Data
Text file : You can Summarize and text file data. If you want to summarize the paragraph create text file (*.txt) for it and put your data inside txt file
PDF file : You can summarize pdf files. You can also mention any particular page number or can give a range of page numbers for summarization. If you only provide the path for pdf file it will summarize whole PDF
Web article : To summarize web article you only have to provide the complete URL or web link.
Youtube podcast : You can also summarize youtube podcast but subtitle for the video should be present. Provide the url as input
Arguments in the Python CLI tool
python3 main.py -h
OUTPUT
usage: main.py [-h] -input INPUT -type TYPE
Python CLI For Text summarization (Ekatra-Hackathon)
optional arguments:
-h, --help show this help message and exit
-input INPUT -input <URL|Path> Provide file URL/Path
-type TYPE -type <OPTION> OPTIONS [t]ext file | [p]df file | [w]eb article link | [y]outube link
Working of CLI Tool
For Text file : Generate summary for text file
python3 main.py -input ./Data/text_file.txt -type t
CLI Tool Generate output.txt & output.json file as Output
For PDF file : Generate summary for pdf file
Summary for whole pdf
python3 main.py -input ./Data/pdf_file.pdf -type p
Summary for any particular page number
let say page number is 45
python3 main.py -input ./Data/pdf_file.pdf-45 -type p
Summary for any range of page number
let say we want summary from page number 36 to 50
python3 main.py -input ./Data/pdf_file.pdf-36-50 -type p
For web article : Generate summary for any web article
python3 main.py -input <pass your web article link here> -type w
For Youtube video : Generate summary for any youtube video
python3 main.py -input <pass your youtube video link here> -type y
About output file (output.txt / output.json)
Output file contains
Summary (summarized form of Input paragraph)
Key Points (Key points have important points from Input paragraph)
Key Terms (Key terms give intution about the summary and makes it easy to understand)
Generate audio file for output file (output.txt)
python3 audio.py
OUTPUT:
output_audio.mp3
About
This repository contain Ekatra-Hackathon-Project called Content Summarizer for Text File / PDF File / Web Article/ Youtube Video using OpenAI GPT-3 model