An interactive AI-powered math tutor that uses the Socratic method to guide students through solving math problems step-by-step.
- Socratic Teaching Method: The AI guides students with questions rather than giving direct answers
- Step-by-step Problem Solving: Breaks down complex problems into manageable steps
- Multiple Support Options:
- "Show Solution" button for complete step-by-step solutions
- "Propose Simpler Problem" for easier practice problems
- Reasoning Question Database: Uses a comprehensive set of reasoning questions to help students think through problems
-
Install Dependencies:
pip install -r requirements.txt
-
Get API Key:
- Go to Google AI Studio
- Create a new API key for Google Generative AI
-
Configure API Key:
Option A: Environment Variable
export GOOGLE_API_KEY='your-api-key-here'
Option B: .env File Create a
.envfile in the project directory:GOOGLE_API_KEY=your-api-key-here -
Run the App:
streamlit run app_ver3.py
- Enter your math problem in the chat input
- The AI will guide you through solving it with questions
- If you get stuck, use the "Show Solution" button for a complete walkthrough
- Use "Propose Simpler Problem" to practice with easier versions
- Click "Start a New Problem" to begin fresh
app_ver3.py: Main application filereasoning_questions.csv: Database of reasoning questions used by the AIrequirements.txt: Python dependenciesREADME.md: This file
Never commit your API key to version control. Always use environment variables or .env files (which should be added to .gitignore).