Code Monkey home page Code Monkey logo

comments-summary-ml-project's Introduction

youtube-comments-summary-project

Please find my Streamlit app hosted here
Please note that if you face an error, the Open AI API credits on my account might have expired :D

Project Summary

The goal of this model is to provide a summary of comment threads for any given Youtube video.

Flow Diagram

Flow Diagram

Approach

  • In this project, I will be using Youtube API V3 to fetch all comment threads for any given youtube video id.
  • I used Streamlit to build this application. It takes a Youtube video url as input. Using the Youtube API, I fetch all the comment threads under that video and provide it to the Tokenizer to break the text into chunks.
  • Then I provide each chunk as an input to the Completions API with the prompt - “Provide a summary of the comments below.” followed by the chunk of comments. The model then returns a brief summary of how people are reacting to that video.

How to use

  1. Create a virtual environment (python3 -m venv venv && source venv/bin/activate)

  2. Download all the dependencies by running make requirements in your terminal

  3. Create a project on Google cloud console and enable Youtube API V3 for your project. Follow instructions here.

  4. Create a .streamlit folder at the source level and add a secrets.toml file to it.

  5. Ensure your Youtube API keys are set as API_SERVICE_NAME, API_VERSION, YOUTUBE_API_KEY in the secrets.toml file (check the secrets.toml.example file for reference). Please find the details to generate the API key here.

  6. Ensure your OpenAI API key is set as an environment variable OPENAI_API_KEY in the secrets.toml file (check the secrets.toml.example file for reference). (see best practices around API key safety here)

  7. Run the streamlit app by running make run

  8. Open the app in your browser at http://localhost:8501

Example

App_Demo

comments-summary-ml-project's People

Contributors

iprinka 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.