Giter Site home page Giter Site logo

davidrd123 / launch-summarize-capstone-yt Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 1.86 MB

A Python tool that summarizes and categorizes Launch School Capstone YouTube presentations using the YouTube Data API, OpenAI API, NLTK, PyLDAvis, and Streamlit

Home Page: https://launch-summarize-capstone-yt.streamlit.app/

Procfile 0.02% Python 13.89% Shell 0.08% HTML 86.01%
nltk-library openai-api pyldavis python streamlit-webapp summarization youtube-api youtube-dl

launch-summarize-capstone-yt's Introduction

Launch School Capstone Project Transcript Analysis

This repository provides tools and methodologies to extract and analyze transcripts from Launch School Capstone Projects. The project consists of a four-step pipeline - fetching video transcripts, processing transcripts, modeling topic data, and delivering an interactive presentation of the results.

Experience the process live and interact with results at Capstone Summary Web App.

Setup & Requirements

  1. Virtual Environment Activation

Before running any scripts, activate your virtual environment (.venv) or Conda environment:

pip install -r requirements.txt
  1. API Credentials

Required API keys for YouTube Data and OpenAI should reside in your .env file as YT_DATA_API_KEY and OPENAI_API_KEY respectively.

Step-by-Step Usage

1. Fetching Video Transcripts

Running get_transcript.py fetches transcripts from YouTube videos, and is specifically targeted at the format of the Launch School Capstone videos (it relies on the video title format to get the project name, etc.). There is an interactive CLI menu that allows you to choose to provide either a video URL or a playlist URL. The script then fetches the transcript for each video in the playlist or the single video.

python get_transcript.py

Each fetched transcript is stored in a directory named after the project and categorized under corresponding <year>/<project_name> directories.

2. Transcript Processing with GPT Models

process_transcript_gpt.py offers control over transcript processing using GPT models. The script produces an interactive CLI menu allowing you to select a project and a GPT model - either 'gpt-4' or 'gpt-3.5-turbo-16k' - for processing.

python process_transcript_gpt.py

Options available within the processing menu include:

  • "Rewrite Transcript in Shorter Form": It condenses the transcript retaining key points. If a rewritten form doesn't exist, this operation should be performed first.

  • "Summarize Rewrite in Outline Form": Provides an outline summary for the rewritten transcript.

  • "Summarize Transcript in Outline Form": Facilitates an outline summary for raw transcripts. Note: This option requires the use of 'gpt-3.5-turbo-16k' for transcripts exceeding 8k tokens.

  • "Get token count of Transcript" and "Get token count of Rewrite": Both options return the token count for respective transcripts.

3. Topic Modeling on Transcripts

LDA (Latent Dirichlet Allocation) implemented in the topic_modeling.py script surfaces dominant topics from the transcripts.

python topic_modeling.py

It uses either raw transcripts or a rewritten form (depends on uncommented lines in the script) and proposes a set of topics for each document. Options for calculating coherence and executing a grid search for parameter optimization are available. Uncomment # pyLDAvis.save_html(lda_viz, 'lda.html') to output an easy-to-understand interactive HTML visualization.

The results also cluster projects by the identified primary topic and measure the level of association. It allows for a comparison and understanding of the broad topics covered per project.

4. Interactive Summary Visualization with Streamlit

The final step encompasses an accessible and interactive summary visualization, available via a Streamlit app. To launch the app, run:

streamlit run view_writeups.py

Now you can embark on analyzing previous Capstone Projects transcripts and discover valuable insights!

launch-summarize-capstone-yt's People

Contributors

davidrd123 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.