{"id":27957445,"url":"https://github.com/adrijadastidar/vta-python","last_synced_at":"2026-04-08T21:31:13.589Z","repository":{"id":290092088,"uuid":"973348294","full_name":"AdrijaDastidar/VTA-python","owner":"AdrijaDastidar","description":"This is the Flask-based backend for the Virtual Teaching Assistant platform","archived":false,"fork":false,"pushed_at":"2025-05-06T10:23:16.000Z","size":2339,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-07T18:12:57.638Z","etag":null,"topics":["cors","ffmpeg","flask","langchain","llama3","noisereduce","pdfplumber","pydub","python","scipy","waitress","whisper-ai"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AdrijaDastidar.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2025-04-26T19:44:12.000Z","updated_at":"2025-05-06T10:26:08.000Z","dependencies_parsed_at":"2025-04-26T20:40:36.158Z","dependency_job_id":null,"html_url":"https://github.com/AdrijaDastidar/VTA-python","commit_stats":null,"previous_names":["adrijadastidar/vta-python"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AdrijaDastidar%2FVTA-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AdrijaDastidar%2FVTA-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AdrijaDastidar%2FVTA-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AdrijaDastidar%2FVTA-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AdrijaDastidar","download_url":"https://codeload.github.com/AdrijaDastidar/VTA-python/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252931554,"owners_count":21827112,"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","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":["cors","ffmpeg","flask","langchain","llama3","noisereduce","pdfplumber","pydub","python","scipy","waitress","whisper-ai"],"created_at":"2025-05-07T18:13:01.420Z","updated_at":"2026-04-08T21:31:13.562Z","avatar_url":"https://github.com/AdrijaDastidar.png","language":"Python","readme":"# 🧠 Virtual Teaching Assistant – Server (Flask Backend)\r\n\r\nThis is the **Flask-based backend** for the **Virtual Teaching Assistant** platform, a smart educational system that uses AI to transcribe lectures, generate summaries, create quizzes, and parse learning materials.\r\n\r\n---\r\n\r\n## 🚀 Features\r\n\r\n- 🎤 **Audio Upload \u0026 Transcription** – Accept `.wav` files and transcribe using OpenAI Whisper\r\n- 🧾 **AI-Powered Summarization** – Summarize transcripts using LLMs (LLaMA 3 via Groq API)\r\n- 🧪 **Quiz Generation** – Extract questions from lecture content with retry logic\r\n- 📂 **PDF Parsing** – Extract text from uploaded PDFs using `pdfplumber`\r\n- 🔗 **RESTful API** – Clean endpoints for frontend interaction\r\n- 🌐 **Cross-Origin Support** – Enabled via `Flask-CORS`\r\n- 🔐 **Environment-based Config** – Secure API keys via `.env`\r\n\r\n---\r\n\r\n## 🛠️ Tech Stack\r\n\r\n| Category            | Tech/Library                         |\r\n|---------------------|---------------------------------------|\r\n| 🖥️ Server Framework | `Flask`, `waitress` (production WSGI) |\r\n| 🎶 Audio Processing  | `ffmpeg`, `whisper`, `pydub`, `noisereduce`, `soundfile`, `scipy` |\r\n| 💬 LLM Integration   | `langchain`, `langchain_groq`, `langchain_experimental`, `llama3` |\r\n| 📝 NLP Utilities     | Custom prompt chaining via `langchain` |\r\n| 📄 File Parsing      | `pdfplumber` for PDF content extraction |\r\n| 🔐 Environment Mgmt  | `python-dotenv`                      |\r\n| 🌍 CORS Handling     | `Flask-CORS`                         |\r\n\r\n---\r\n\r\n## 🔧 Setup Instructions\r\n\r\n### ✅ Prerequisites\r\n\r\n* Python 3.9+\r\n* FFmpeg installed (for audio preprocessing)\r\n* `.env` file with your Groq API key\r\n\r\n### 🧪 Installation\r\n\r\n```bash\r\n# Clone and enter project\r\ncd server-python\r\n\r\n# Create virtual environment\r\npython -m venv venv\r\nsource venv/bin/activate  # Windows: venv\\Scripts\\activate\r\n\r\n# Install dependencies\r\npip install -r requirements.txt\r\n```\r\n\r\n### 📄 .env Example\r\n\r\n```\r\nGROQ_API_KEY=your_groq_api_key_here\r\n```\r\n\r\n---\r\n\r\n## ▶️ Running the Server\r\n\r\n```bash\r\npython app.py\r\n```\r\n\r\nRuns at: [http://localhost:5000](http://localhost:5000)\r\n\r\n---\r\n\r\n## 🌐 API Endpoints\r\n\r\n| Method  | Endpoint         | Description                                    |\r\n| ------- | ---------------- | ---------------------------------------------- |\r\n| 📤 POST | `/getTranscript` | Upload `.wav` file and generate summary + quiz |\r\n| 📝 POST | `/summary`       | Generate summary JSON from transcript          |\r\n| 🧪 POST | `/quiz`          | Generate quiz JSON from transcript             |\r\n| 📄 POST | `/pdf`           | Extract raw text from uploaded PDF file        |\r\n\r\n\r\n---\r\n\r\n## 🧪 Testing \u0026 Debugging\r\n\r\n* Use Swagger alternatives like [Postman](https://www.postman.com/) to test endpoints.\r\n* Debug statements included in logs for API calls to internal services.\r\n\r\n---\r\n\r\n## 🛡️ Production Deployment\r\n\r\nYou can deploy using:\r\n\r\n* `waitress` (already integrated)\r\n* Docker (optional Dockerfile)\r\n* Render, Heroku, or any Linux server with Python 3.9+\r\n\r\nExample production run:\r\n\r\n```bash\r\nwaitress-serve --host 0.0.0.0 --port 5000 app:app\r\n```\r\n\r\n---\r\n\r\n## 🤝 Contributing\r\n\r\nWe welcome all contributors! You can:\r\n\r\n* 🔍 File bugs\r\n* 🌱 Suggest improvements\r\n* 📦 Submit pull requests\r\n\r\n---\r\n\r\n### 👩‍🏫 Let's build better classrooms with AI — one lecture at a time! 🚀\r\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadrijadastidar%2Fvta-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadrijadastidar%2Fvta-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadrijadastidar%2Fvta-python/lists"}