Aivy: AI Learning Assistant Aivy is a next-generation learning assistant that integrates various educational tools into a unified platform. Built with Airflow, FastAPI, and Streamlit, it offers a personalized, engaging, and efficient learning experience by combining text, videos, flashcards, and quizzes.
Why Aivy?
- Unified Learning Tools: Access all your learning content (text, images, videos, quizzes) in one place.
- Personalized Assistance: AI tailors learning content and assessments to user needs.
- Advanced Search: Powered by RAG (Retrieval-Augmented Generation) for context-aware results.
- Engaging UI: Intuitive, interactive, and user-friendly.
Architecture diagram for the same:
- Dynamic Lesson Plans:
- Lessons organized into modules with titles, descriptions, and detailed explanations.
- Quiz and Flashcard Generation:
- Auto-generated quizzes and flashcards based on lesson content.
- RAG Functionality:
- Retrieves relevant YouTube videos, images, and text for user queries.
- Logging and Testing:
- Comprehensive logging in Streamlit and Airflow for error tracking.
- APIs tested extensively with Postman.
- Scalable Design:
- Separate environments for Streamlit and FastAPI to ensure modularity.
The project is divided into three main components:
- Handles data extraction pipelines for lesson content, images, and links.
- Key files:
extraction.py: Extracts lesson content.image_extraction.py: Processes images.links.py: Manages and fetches additional learning resources.GFG_Data_Extraction_DAG.py: Manages and schedules DAG workflows.
- Backend API for:
- Fetching lessons, images, and YouTube video URLs.
- Generating quizzes and flashcards.
- Lightweight and scalable.
- User-friendly frontend for:
- Navigating and viewing lesson plans.
- Interacting with quizzes and results.
- Files include:
lesson.py: Displays detailed lesson content.quiz.py: Manages quiz interface and results.planner.py: Allows navigation across modules and plans.
├── Airflow
│ ├── dags
│ │ ├── extraction_files
│ │ │ ├── extraction.py
│ │ │ ├── image_extraction.py
│ │ │ ├── links.py
│ │ │ ├── testfiles/
│ │ ├── GFG_Data_Extraction_DAG.py
│ ├── Dockerfile
│ ├── docker-compose.yml
│ ├── entrypoint.sh
│ ├── requirements.txt
├── fastapi
│ ├── config.py
│ ├── lessons.py
│ ├── main.py
│ ├── Dockerfile
│ ├── poetry.lock
├── streamlit
│ ├── ui
│ │ ├── lesson.py
│ │ ├── planner.py
│ │ ├── plans.py
│ │ ├── quiz.py
│ ├── app.py
│ ├── Dockerfile
│ ├── docker-compose.yml
│ ├── README.md
├── diagrams
│ ├── images
│ │ ├── folder_structure.png
│ │ ├── architecture_diagram.png
git clone <repository-link>
cd <repository-folder>cd streamlit
python -m venv venv_streamlit # Create virtual environment
source venv_streamlit/bin/activate # Activate the environment
poetry install # Install dependenciescd fastapi
python -m venv venv_fastapi # Create virtual environment
source venv_fastapi/bin/activate # Activate the environment
poetry install # Install dependenciescd Airflow
docker-compose up --buildcd fastapi
source venv_fastapi/bin/activate
poetry install
uvicorn main:app --reloadcd streamlit
source venv_streamlit/bin/activate
poetry install
streamlit run app.pyYou can access the related files to this project here:
- Documentation: Google Docs - Documentation
- Deployed FastAPI: FastAPI Docs
- Deployed Streamlit: Streamlit App
This project integrates Airflow, FastAPI, and Streamlit to provide a dynamic learning assistant. With separate environments and comprehensive testing, it is scalable, efficient, and user-friendly.
