An AI-powered tutoring application built with Python, featuring an interactive canvas for drawing and writing, powered by Google's Gemini Vision API.
- 🎨 Interactive canvas for drawing and writing
- 🤖 AI tutor powered by Gemini Vision API
- 📚 Topic-based learning with markdown files
- 💾 Session history saved as JSON
- 👧 Designed for young learners
- Install dependencies:
pip install -r requirements.txt- Set up your API key:
- Get a Google Gemini API key from: https://makersuite.google.com/app/apikey
- Create a
.envfile in the project root:
GEMINI_API_KEY=your_api_key_here- Run the application:
python -m solara run app.py- Open in browser:
- Navigate to http://localhost:8765
Create a new markdown file in the topics/ folder with the following structure:
# Topic Name
## Learning Objectives
- Objective 1
- Objective 2
## Materials
[Your teaching content here - can be as long as needed]
## Example Problems
- Problem 1
- Problem 2leai_tutor/
├── app.py # Main application (Solara UI)
├── models.py # Data models (Topic, Message, Session)
├── topic_loader.py # Topic parsing and loading
├── session_manager.py # Session storage and management
├── ai_service.py # Gemini AI integration
├── requirements.txt # Dependencies
├── pytest.ini # Test configuration
├── test_models.py # Tests for data models
├── test_topic_loader.py # Tests for topic loader
├── test_session_manager.py # Tests for session manager
├── tests_README.md # Testing documentation
├── .env # API keys (create this)
├── topics/ # Learning topics (markdown files)
├── sessions/ # Session history (auto-generated)
└── README.md # This file
- Select a topic from the dropdown
- Click "Start New Session"
- Read the AI tutor's instructions
- Draw or write your work on the canvas
- Type any text answers or questions
- Click "Submit Answer" to get feedback
- Sessions are automatically saved
The project includes comprehensive unit tests for the core functionality.
To run tests:
pytestFor more details, see tests_README.md.
- Solara: Python web framework
- ipycanvas: Interactive drawing canvas
- Google Gemini Vision API: AI analysis
- Python 3.8+: Backend logic
- pytest: Testing framework