{"id":31850319,"url":"https://github.com/no0bitah/video-insights-rag","last_synced_at":"2025-10-12T11:28:44.381Z","repository":{"id":316380233,"uuid":"1063123582","full_name":"No0Bitah/Video-Insights-RAG","owner":"No0Bitah","description":"AI-powered video analysis using Whisper for transcription and Gemma 3 for summarization, Q\u0026A, and insights.","archived":false,"fork":false,"pushed_at":"2025-10-02T01:23:59.000Z","size":37,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-02T02:46:22.066Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/No0Bitah.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-24T07:42:23.000Z","updated_at":"2025-10-02T01:24:03.000Z","dependencies_parsed_at":"2025-09-24T09:42:47.556Z","dependency_job_id":null,"html_url":"https://github.com/No0Bitah/Video-Insights-RAG","commit_stats":null,"previous_names":["no0bitah/video-insights-rag"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/No0Bitah/Video-Insights-RAG","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/No0Bitah%2FVideo-Insights-RAG","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/No0Bitah%2FVideo-Insights-RAG/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/No0Bitah%2FVideo-Insights-RAG/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/No0Bitah%2FVideo-Insights-RAG/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/No0Bitah","download_url":"https://codeload.github.com/No0Bitah/Video-Insights-RAG/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/No0Bitah%2FVideo-Insights-RAG/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279011181,"owners_count":26084899,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-12T02:00:06.719Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-10-12T11:28:42.768Z","updated_at":"2025-10-12T11:28:44.369Z","avatar_url":"https://github.com/No0Bitah.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n\n# 🎥 Video Insight RAG\n\n### **One-line value prop:** Convert video/audio into a searchable transcript and ask natural-language questions — powered by Whisper, embeddings (MiniLM), and a RAG (retrieval-augmented generation) pipeline so you get accurate, transcript-grounded answers.\n\n[![Build Status](https://img.shields.io/badge/build-passing-brightgreen)](link)\n[![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)\n[![Python](https://img.shields.io/badge/python-3.10+-blue.svg)](https://www.python.org/downloads/)\n[![Last Commit](https://img.shields.io/github/last-commit/No0Bitah/Video-Insights-RAG)](link)\n\n[Live Demo](https://youtube.com/shorts/6xBtUXh7CTw?feature=share) • [Documentation](#-documentation--api-reference) • [Report Bug](https://github.com/No0Bitah/Video-Insights-RAG/issues) • [Request Feature](https://github.com/No0Bitah/Video-Insights-RAG/issues)\n\n\u003c/div\u003e\n\n---\n\n## 🚀 Overview\n\n**VideoInsight RAG** is a powerful full-stack application that transforms any uploaded audio or video file (like lectures, meetings, or podcasts) into a searchable, conversational knowledge base. It uses FastAPI for a robust backend, Whisper for high-accuracy transcription, Sentence Transformers for efficient vector embeddings, and a flexible architecture that supports both local Ollama models and cloud-based OpenAI for the conversational AI. This allows users to ask questions directly to the content of the media file, bypassing the need to watch the entire recording.\n\n### ✨ Key Features\n\n| Feature | Description |\n|---------|-------------|\n| 🗣️ **High-Accuracy Transcription** | Powered by faster-whisper for quick, precise speech-to-text |\n| 🧠 **Flexible LLM Support** | Switch between local Ollama models and cloud-based OpenAI |\n| 🔍 **RAG-Powered Q\u0026A** | Retrieval Augmented Generation ensures answers grounded in transcript |\n| 🌐 **Simple Web Interface** | Drag-and-drop upload with real-time chat capabilities |\n| 🚀 **Python Native** | Built with FastAPI for easy extension and deployment |\n\n---\n\n## 📋 Table of Contents\n\n- [Quick Start](#quick-start)\n- [Installation](#installation)\n- [Usage](#usage)\n- [API Reference](#api-reference)\n- [Project Structure](#project-structure)\n- [Configuration](#configuration)\n- [Contributing](#contributing)\n- [Troubleshooting](#troubleshooting)\n- [For Hiring Managers](#for-hiring-managers)\n- [License](#license)\n- [Acknowledgements](#acknowledgements)\n- [Support](#support)\n\n\n---\n\n## ⚡ Quick Start\n\n### Prerequisites\n\nBefore you begin, ensure you have:\n\n- **Python 3.10+**\n- **ffmpeg** installed on your system\n- **pip** package manager\n- Optional: GPU with CUDA for faster transcription\n- Optional: **Ollama** running locally (for local LLM mode)\n- Optional: **OpenAI API key** (for cloud LLM mode)\n\n### Installation\n\n1. **Clone the repository**\n   ```bash\n   git clone https://github.com/No0Bitah/Video-Insights-RAG.git\n   cd Video-Insights-RAG\n   ```\n\n2. **Create and activate virtual environment**\n   ```bash\n   # Create virtual environment\n   python -m venv .venv\n   \n   # Activate (macOS/Linux)\n   source .venv/bin/activate\n   \n   # Activate (Windows)\n   .venv\\Scripts\\activate\n   ```\n\n3. **Install dependencies**\n   ```bash\n   pip install -r requirement.txt\n   ```\n\n---\n\n## 🎯 Usage\n\n### Option 1: Run with Ollama (Local)\n\nEnsure Ollama is running on `http://localhost:11434` and you have pulled the model specified in `config.py` (default: `gemma:2b`).\n\n```bash\n# Linux/macOS\nexport LLM_MODE=ollama\nuvicorn api:app --reload\n\n# Windows CMD\nset LLM_MODE=ollama\nuvicorn api:app --reload\n```\n\n### Option 2: Run with OpenAI (Cloud)\n\nSet your OpenAI API key as an environment variable.\n\n```bash\n# Linux/macOS\nexport LLM_MODE=openai\nexport OPENAI_API_KEY=\"sk-your-api-key-here\"\nuvicorn api:app --reload\n\n# Windows CMD\nset LLM_MODE=openai\nset OPENAI_API_KEY=sk-your-api-key-here\nuvicorn api:app --reload\n```\n\n### Access the Application\n\nNavigate to **`http://127.0.0.1:8000`** in your browser.\n\n---\n\n## 💻 Usage Examples\n\n### Web Interface\n\n1. Start the server\n2. Open `http://127.0.0.1:8000/`\n3. Upload an audio/video file\n4. Click \"Transcribe\"\n5. Start asking questions about the content\n\n### API Usage\n\n**Upload and transcribe:**\n```bash\ncurl -X POST \"http://127.0.0.1:8000/transcribe/\" \\\n  -F \"file=@/path/to/meeting.mp4\"\n```\n\n**Ask a question:**\n```bash\ncurl -X POST \"http://127.0.0.1:8000/chat/\" \\\n  -H \"Content-Type: application/x-www-form-urlencoded\" \\\n  -d \"query=What are the next steps?\" \\\n  -d \"top_k=3\"\n```\n\n---\n\n## 📚 API Reference\n\n### Endpoints\n\n| Method | Endpoint | Description |\n|--------|----------|-------------|\n| `GET` | `/` | Redirects to the web interface |\n| `POST` | `/transcribe/` | Upload audio/video file and receive transcript |\n| `POST` | `/chat/` | Ask questions about the transcribed content |\n\n### Core Functions\n\n- **`transcription(file_path)`** - Processes audio/video using Whisper model\n- **`load_transcription(text)`** - Splits transcript and creates embeddings\n- **`retrieve(query, top_k)`** - Finds relevant chunks via cosine similarity\n- **`ask_model(query, top_k)`** - Generates answers using Ollama or OpenAI\n\n---\n\n## 📁 Project Structure\n\n```\nvideo-insight-rag/\n├── static/\n│   ├── css/\n│   │   └── style.css          # Styling for web interface\n│   ├── html/\n│   │   └── index.html         # Main frontend page\n│   └── js/\n│       └── script.js          # Frontend logic\n├── api.py                     # FastAPI backend (main entry point)\n├── config.py                  # Configuration and model settings\n└── requirement.txt            # Python dependencies\n```\n\n---\n\n## ⚙️ Configuration\n\nEdit `config.py` to customize:\n\n- **Whisper Model**: Change transcription model size\n- **Embedding Model**: Modify sentence transformer model\n- **LLM Settings**: Configure Ollama model or OpenAI parameters\n- **Chunk Settings**: Adjust text splitting parameters\n\n---\n\n## 🤝 Contributing\n\nWe welcome contributions! Here's how you can help:\n\n1. Fork the repository\n2. Create a feature branch: `git checkout -b feat/your-feature`\n3. Install dependencies: `pip install -r requirement.txt`\n4. Make your changes and test thoroughly\n5. Commit with clear messages: `git commit -m \"feat: add new feature\"`\n6. Push to your fork: `git push origin feat/your-feature`\n7. Submit a Pull Request\n\n### Contribution Guidelines\n\n- Follow PEP8 code style\n- Keep commits atomic and focused\n- Use conventional commit messages (`feat:`, `fix:`, `docs:`, `refactor:`)\n- Add tests for new features\n- Update documentation as needed\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md) for detailed guidelines.\n\n---\n\n## 🐛 Troubleshooting\n\n| Issue | Solution |\n|-------|----------|\n| **No transcript loaded** | Upload a file first using the transcribe endpoint |\n| **ffmpeg not found** | Install ffmpeg: `apt-get install ffmpeg` (Linux) or `brew install ffmpeg` (macOS) |\n| **OpenAI API error** | Verify `OPENAI_API_KEY` environment variable is set correctly |\n| **Ollama connection error** | Ensure Ollama server is running on `http://localhost:11434` |\n| **Slow transcription** | Consider using a smaller Whisper model or enabling GPU acceleration |\n\n---\n\n## 🎯 For Hiring Managers\n\nThis project demonstrates:\n\n- **Full-stack development** with Python backend and vanilla JS frontend\n- **ML/AI integration** using Whisper, embeddings, and RAG architecture\n- **API design** with FastAPI and RESTful principles\n- **Flexible architecture** supporting multiple LLM providers\n- **Production-ready code** with proper structure and documentation\n\n**Tech Stack**: Python • FastAPI • Whisper • Sentence Transformers • Ollama • OpenAI • HTML/CSS/JS\n\n---\n\n## 📄 License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n### MIT License Summary\n\n```\nCopyright (c) 2025 [Your Name]\n\nPermission is hereby granted, free of charge, to use, copy, modify, merge,\npublish, distribute, sublicense, and/or sell copies of the Software.\n```\n\n---\n\n## 🙏 Acknowledgements\n\nBuilt with these amazing technologies:\n\n- [faster-whisper](https://github.com/guillaumekln/faster-whisper) - Efficient Whisper implementation\n- [sentence-transformers](https://www.sbert.net/) - State-of-the-art sentence embeddings\n- [FastAPI](https://fastapi.tiangolo.com/) - Modern Python web framework\n- [Ollama](https://ollama.ai/) - Local LLM runtime\n- [OpenAI](https://openai.com/) - GPT models\n\n---\n\n## 📞 Support\n\n- **Issues**: [GitHub Issues](https://github.com/No0Bitah/Video-Insights-RAG/issues)\n- **Discussions**: [GitHub Discussions](https://github.com/No0Bitah/Video-Insights-RAG/discussions)\n- **Email**: jomari.daison@gmail.com\n\n---\n\n**Made with ❤️ by [No0Bitah](https://github.com/No0Bitah)**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fno0bitah%2Fvideo-insights-rag","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fno0bitah%2Fvideo-insights-rag","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fno0bitah%2Fvideo-insights-rag/lists"}