Skip to content

oshea00/openai-summarize-youtube

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Description

Uses openai to summarize YouTube video transcripts. Demonstrates use of moderation api to check optional user-provided prompt.

Installation

You will need to have OPENAI_API_KEY environment variable set to run this, or create a '.env' file in the directory (or parent) where script is run.

To install dependencies, use pipenv:

> pipenv install

Or, use pip3 with the requirements.txt

> pip3 install -r requirements.txt

Usage

To run development server:

> python server.py

API Endpoint: /summarize

Description

This endpoint returns a textual summary of the video and takes two parameters:

  • video_url (required): A valid YouTube URL of the video whose transcript needs to be summarized.
  • prompt (optional): A user-provided prompt that specifies how the transcript output should be treated.

API Endpoint: /transcribe

Description

This endpoint returns the video transcript and takes takes one parameter:

  • video_url (required): A valid YouTube URL of the video whose transcript needs to be transcribed.

Examples

License

License

This project is licensed under the MIT License.

About

Demo of openai summarization and moderation

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages