A retrieval-augmented generation (RAG) application that allows you to ask questions about your class recordings. The app processes SRT subtitle files, stores embeddings in a local Chroma vector database, and uses OpenAI to generate answers based on the retrieved context.
- Parse and process SRT subtitle files from class recordings
- Generate text embeddings using OpenAI's text-embedding-ada-002 model
- Store embeddings locally with Chroma (persistent vector database)
- Ask natural language questions about your class content
- Streamlit-based web interface for easy interaction
zoomllm/
├── main.py # Script to process SRT files and populate the vector database
├── llm.py # Streamlit app for Q&A interface
├── app.py # (Optional) Additional app logic
├── requirements.txt # Python dependencies
├── chroma_db/ # Local Chroma database (auto-generated)
└── srt_files/ # Folder containing your SRT subtitle files
- Python 3.10 or higher
- OpenAI API key
-
Clone the repository:
git clone https://github.com/droidmaximus/zoomllm.git cd zoomllm -
Create and activate a virtual environment (optional but recommended):
python -m venv venv venv\Scripts\activate # Windows # or source venv/bin/activate # macOS/Linux
-
Install dependencies:
pip install -r requirements.txt
-
Set up your OpenAI API key:
-
For local development, create a
.streamlit/secrets.tomlfile:OPENAI_API_KEY = "your-openai-api-key-here"
-
For Streamlit Community Cloud, add the secret in the app dashboard under "Secrets".
-
Place your SRT subtitle files in the srt_files/ folder, then run:
python main.pyThis will:
- Parse each SRT file
- Generate embeddings for each subtitle line
- Store the embeddings in the local Chroma database (
chroma_db/)
Start the Streamlit app:
streamlit run llm.pyOpen the provided URL in your browser, enter a question about your class recordings, and get an answer based on the stored content.
- Push your code to GitHub (ensure
.streamlit/secrets.tomlis in.gitignore). - Go to Streamlit Community Cloud and sign in.
- Select your repository and deploy.
- Add your
OPENAI_API_KEYin the "Secrets" section of the app settings.
- OpenAI Model: The app uses
gpt-4.1-minifor chat completions andtext-embedding-ada-002for embeddings. You can change these inllm.pyandmain.py. - Chroma Database Path: By default, the database is stored in
chroma_db/. Modify thepathparameter inchromadb.PersistentClient()to change this.
- ModuleNotFoundError: Ensure all dependencies are installed with
pip install -r requirements.txt. - API Key Errors: Verify your OpenAI API key is correctly set in
.streamlit/secrets.tomlor as an environment variable. - Protobuf Errors: The
requirements.txtpinsprotobuf==3.20.3to avoid compatibility issues with Chroma and OpenTelemetry.
droidmaximus