Repository of the code base for KT Generation process that we worked at LifeSight, Google Cloud and Searce GenAI Hackathon.
- Code
- Presentation
- Readme.md
- ffmpeg
- poetry
- Copy
Code/KT Generator/.env.sampletoCode/KT Generator/.envand fill in the values. - Create a file
kt_gen3in the root directory. - Create a folder called
testin the root directory and add the codebase you wish to test in it. - Create a folder called
scriptsin the root directory. The scripts generated for the videos will be stored here. - Edit the
required_nodeswith the required functions/classes. a. Class format =class_nameb. Function format =class_name.function_name - Install deps with
$ poetry install - Add poe as a poetry plugin
$ poetry self add 'poethepoet[poetry_plugin]' - Run tests with
$ poetry poe test - Lint with
$ poetry poe lint - Run a local build with
$ poetry poe all
Note: This is a happy path, so if any errors, report
$ poetry poe run
- Default model is
gpt-4. Pass the required model to service configuration to change.
This folder contains the code base for the KT Generation process.
- KT Generator
CodeParser.py: This file contains the code to parse the code base and chunk it into logical code blocks (chunks).CarbonSnippets.py: This file generates thecarbon.nowsnippets for the code blocks.ResponseGenerator.py: This file generates the explaination and the code summary using Llamaindex and PaLM LLM.DIDVideoGenerator.py: This file generates the DID video avatar using the code explainations for all the chunks.CreateVideo.py: This file stitches the final video using the videos and the code snippets and the summary.main.py: This file is the main file that runs the entire process.