An interactive math tutor chatbot powered by the Gemini API and GSM8K dataset, designed to solve math questions and provide helpful explanations. Built using Streamlit for the front-end and a custom Math Agent backend.
- 💬 Ask any math question in natural language
- 🤖 AI-powered answers using Gemini and few-shot reasoning
- 🧠 Context-aware reasoning from the GSM8K dataset
- 👍👎 Feedback collection for continuous improvement
- 📄 CSV download of all feedback logs
- 🌐 Deployed via steamlit
For demonstration, the API key is currently hardcoded in streamlit_app.py for immediate testing.
In real applications, API keys should be stored securely using environment variables or secret managers.
Due to deployment constraints, .env file did not work reliably for this demo.
Future updates may include:
- Allowing users to enter their own API keys dynamically.
- Using proper secret storage techniques.
- Frontend: Streamlit
- Backend: Python
- LLM API: Gemini Pro (
Google Generative AI) - Data Source: GSM8K (math reasoning dataset)
- Utilities: Pandas, pyngrok
git clone https://github.com/your-username/AI-MathAgent.git
cd math-tutor-ai
-
Install dependencies pip install -r requirements.txt
-
Set your API key
Open app.py and insert your Gemini API key: GEMINI_API_KEY = "your-google-api-key" TAVILY_API_KEY = None # Optional, leave as None if not used
- Run the app streamlit run app.py
- (Optional) Expose with ngrok For Colab or remote sharing: from pyngrok import ngrok ngrok.connect(8501) Use the generated public URL to access the app. --