๐ Advanced Math Tutor
This application provides step-by-step solutions to math problems using advanced AI models. Solutions are generated in HTML format with download and print-to-PDF capabilities. Choose between OpenRouter's Phi-4-reasoning-plus for text-based problems or Together AI's Llama-Vision for problems with images.
Example Problems
How to Use the Advanced Math Tutor
New Features ๐
- HTML-formatted solutions: All responses are now generated in beautiful HTML format
- Download HTML: Download the complete solution as an HTML file
- Download PDF: Convert and download solutions as PDF files
- Print functionality: Use the "Print to PDF" button in the HTML output to print directly
Getting Started
For Text-Based Problems (OpenRouter)
- You'll need an API key from OpenRouter
- Sign up at OpenRouter to get your API key
- Enter your API key in the designated field in the "Text Problem Solver" tab
For Image-Based Problems (Together AI)
- You'll need an API key from Together AI
- Sign up at Together AI to get your API key
- Enter your API key in the designated field in the "Image Problem Solver" tab
- Upload an image of your math problem
- Optionally add text to provide additional context
Solving Math Problems
- For text problems: Type or paste your math problem in the input field
- For image problems: Upload a clear image of the math problem
- Click "Solve Problem" to get a detailed step-by-step solution in HTML format
- Use the download buttons to save HTML or PDF versions
- Click "Print to PDF" within the solution to print directly from your browser
HTML Output Features
- Professional styling: Clean, readable format with proper typography
- Mathematical expressions: Highlighted math expressions and code blocks
- Step-by-step sections: Clearly organized solution steps
- Print-friendly: Optimized for printing and PDF conversion
- Timestamps: Each solution includes generation timestamp
Tips for Best Results
- Be specific in your problem description
- Include all necessary information
- For complex equations, use clear notation
- For algebraic expressions, use ^ for exponents (e.g., x^2 for xยฒ)
- Use parentheses to group terms clearly
- For images, ensure the math problem is clearly visible and well-lit
Types of Problems You Can Solve
- Algebra (equations, inequalities, systems of equations)
- Calculus (derivatives, integrals, limits)
- Trigonometry
- Geometry
- Statistics and Probability
- Number Theory
- And many more!
Required Dependencies
To run this application, you'll need to install:
pip install gradio openai together pillow markdown weasyprint
About
This enhanced application uses Microsoft's Phi-4-reasoning-plus model via OpenRouter for text-based problems and Llama-Vision-Free via Together AI for image-based problems.
New Features:
- HTML-formatted responses with professional styling
- Download solutions as HTML files
- Convert and download solutions as PDF files
- Print-to-PDF functionality
- Enhanced formatting with mathematical expressions highlighting
Your API keys are required but not stored permanently.