Skip to content

NvkAnirudh/ChatGPT_Automation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ChatGPT_Automation

This project aims to monitor a designated folder for recently added video transcript files and automate the execution of a Python script. This script leverages the content within the transcript files to generate prompts for GPT-3.5-Turbo by OpenAI to obtain summaries.

Overview

The auto_run.py script employs the watchdog library to monitor file system events within a specified folder. Upon the addition of a new transcript file, it automatically initiates the execution of the chatgpt_automation.py script, passing the name of the newly added file as an argument. In the latter script, an API call is made to GPT-3.5-Turbo, utilizing the content of the transcript file as a prompt, and the model's response is obtained as the summary.

Installation

OpenAI and watchdog are the important libraries required for the scripts to run successfully.

pip install --upgrade openai watchdog

Setting up OpenAI's API Key

Check this to add an environment variable and make your API key accessible to all projects.

Usage

  1. Open the auto_run.py file and update the FOLDER_TO_MONITOR variable with the absolute path of the folder you want to monitor. Also, update output_dir in the chatgpt_automation.py script

  2. Run the script:

    python auto_run.py
    

    This script will now monitor the specified folder, and whenever a new file is added, it will trigger the execution of chatgpt_automation.py with the file's name as an argument.

Customization

  1. You can customize the behavior of the script by modifying the MyHandler class in the auto_run.py file.

  2. Adjust the logic in chatgpt_automation.py to process the newly added file according to your requirements.

Pricing

Understanding pricing is really important before you run this project. So please KEEP THIS IN MIND!

You can check out OpenAI's pricing structure here

Contributions

Contributions are welcome! Feel free to open issues or submit pull requests.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages