YTBrief is a simple web application that summarizes YouTube videos using the Gemini API. Users can paste a YouTube link, and the application retrieves the video’s transcript and generates a concise summary, making it easier to grasp the content without watching the entire video. It also provides the summary in the PDF format for offline reading and "Read out Loud" feature to listen to the contents of the summary.
The project is organized into two main parts:
- Frontend: Contains the ReactJS UI, located in the
yt-brief
folder. - Backend: Contains the Flask server and Python scripts, located in the
ytBrief_Backend
folder.
- Enter a YouTube URL to summarize its content (transcript must be available).
- Displays the video title, channel name, and thumbnail.
- Displays the stats (Views, Likes, Comments, Duration, Published, Channel).
- Utilizes the Gemini API for summarization.
- Makes the summary available in PDF format for offline reading.
- Reads out loud the summary which you pause/play and stop at anytime.
- Python 3.7 or higher
- ReactJS for creating an easy-to-use web app framework.
- Flask for handleling API requests from the backend
- Gemini API for summarization capabilities.
- BeautifulSoup for web scraping functionality.
- youtube-transcript-api for retrieving video transcripts.
- python-dotenv for managing environment variables and securely loading API keys from a
.env
file. - google-api-python-client for enabling seamless integration with Google APIs.
-
Clone the repository:
git clone https://github.com/RiyaTorgal/YTBrief.git
-
Change the Directory
cd YTBrief
-
Create a
.env
file in the root directory of the project and add your Gemini and YouTube Data API keyGEMINI_API_KEY = "Your_Gemini_api_Key" YOUTUBE_API_KEY = "Your_YouTube_Data_API_Key"
-
Navigate to the
yt-brief
folder:cd yt-brief
-
Install Dependencies:
npm install
-
Start the React App:
npm run start
-
Navigate to the
ytBrief_Backend
folder:cd ytBrief_Backend
-
Install required Python packages:
pip install -r requirements.txt
-
Start the Flask serve:
python app.py
-
Start both the frontend and backend servers in separate terminals.
-
Open the frontend app by navgating to
http://localhost:3000
in your browser -
Enter a YouTube URL in the input field and click the "Summarize" button. The application will display the video title, channel name, thumbnail, and the generated summary.
Contributions are welcome! Please fork the repository and submit a pull request with your changes.
This project is licensed under the MIT license - see the LICENSE file for details.