Math Problem Solver Using Qwen2-VL OCR

This project demonstrates how to build a simple Streamlit application for solving handwritten math problems. It uses the Qwen2-VL model for OCR (Optical Character Recognition) and problem-solving tasks. Users can draw math equations on a canvas, and the model will process the input and provide the correct solution.

How It Works

Loading the Model:

The app loads the Qwen2-VL model and its associated processor. This model is capable of handling both images and text inputs to solve complex math equations.

Canvas Input:

The Streamlit Drawable Canvas allows users to draw math equations on a white canvas. Once the equation is drawn, the app captures the image data.

OCR and Solution Generation:

The drawn image is passed to the Qwen2-VL model, which extracts the text (equation) from the image using OCR.The app then processes this extracted text and solves the equation

    • Display the Solution:
    • The solution to the math problem is displayed to the user.