Math Tutor AI is a Streamlit-based web application that provides personalized assistance in solving math problems across different levels. This AI-powered tutor uses various language models to offer step-by-step explanations, guidance, and solutions to mathematical problems.
- Interactive chat interface for asking math questions and describing problems
- Support for multiple AI models, including OpenAI's GPT models and Ollama's local models
- Customizable focus on specific math categories
- Adjustable difficulty levels (Elementary to Graduate)
- Dark/Light theme toggle
- Conversation saving and loading functionality
- Token usage tracking
-
Clone this repository:
git clone https://github.com/lalomorales22/MathTutorAI-Streamlit100.git cd math-tutor-ai
-
Install the required dependencies:
pip install -r requirements.txt
-
Set up your OpenAI API key as an environment variable:
export OPENAI_API_KEY='your-api-key-here'
-
(Optional) If you want to use Ollama models, make sure you have Ollama installed and running on your system.
-
Run the Streamlit app:
streamlit run math_tutor_ai.py
-
Open your web browser and navigate to the URL provided by Streamlit (usually
http://localhost:8501
). -
Enter your name, select your preferred math categories and difficulty level, and start asking math questions!
- You can modify the
MATH_CATEGORIES
andDIFFICULTY_LEVELS
lists in the code to add or remove categories and levels. - The custom instructions for the AI can be adjusted in the sidebar of the application.
Contributions to improve Math Tutor AI are welcome! Please feel free to submit pull requests or open issues to discuss potential enhancements.
This project is licensed under the MIT License - see the LICENSE file for details.