This project provides an interactive learning platform for the NCERT Sound chapter, offering various tools to enhance understanding and engagement with the material.
A detailed development guide can be found on notion
- Question & Answer System: Ask questions about the Sound chapter and receive detailed answers.
- Text-to-Speech: Convert text answers to speech for auditory learning.
- Chapter Summary: Generate concise summaries of the chapter content.
- Interactive Quiz: Take quizzes with dynamically generated questions and receive instant feedback.
- Summary Flowchart: Visualize the chapter's key concepts in a flowchart format.
- Exam Guide: Generate custom exam guides with practice questions.
- Backend: FastAPI
- Frontend: Streamlit
- AI Model: Google's Gemini 1.5 Flash
- Vector Database: Chroma
- Embeddings: Hugging Face (sentence-transformers/all-MiniLM-L6-v2)
- PDF Processing: PyPDFLoader, PDFPlumberLoader
- Text-to-Speech: Sarvam AI API
api.py
: FastAPI backend serverfrontend.py
: Streamlit frontend applicationingest.py
: PDF ingestion and text splittingrag_system.py
: RAG (Retrieval-Augmented Generation) system implementationvector_db.py
: Vector database creation and management
- Clone the repository
- Install dependencies:
pip install fastapi streamlit langchain google-generativeai requests chromadb sentence_transformers langchain_community pydantic chromadb uvicorn
- Set up environment variables:
GOOGLE_API_KEY
: Your Google API key for GeminiSARVAM_API_KEY
: Your Sarvam AI API key for text-to-speech
- Start the FastAPI backend:
uvicorn api:app --reload
- Run the Streamlit frontend:
streamlit run frontend.py
- Open the Streamlit app in your browser (typically at
http://localhost:8501
). - Use the sidebar to navigate between different tools:
- Ask questions about the Sound chapter
- Generate chapter summaries
- Take quizzes
- View summary flowcharts
- Create exam guides
- Explore the Text-to-Speech feature to listen to responses.