This project is a Python-based application designed to solve multiple-choice questions (A/B/C/D answers) using OpenRouter AI through the openai module. The application features a custom GUI built with customtkinter for a seamless user experience.
- Multiple-Choice Question Solver: Automatically solve questions with A/B/C/D answers.
- Custom GUI: Intuitive interface built with customtkinter.
- OCR Integration: Extract text from images using easyocr.
- AI-Powered Solutions: Generate answers via OpenRouter AI with openai api.
- Image Processing: Handle images using Pillow.
- Export to files: Save solutions to
.odtfiles using odfpy or to markdown format.md. - Export to flashcard: Save solution to anki for later revise and quicker learning.
Important
The GUI will look great only on linux machine (tested on Debian). There may be problems with the appearance of the application when using Windows.
Warning
Required: You must set up an OpenRouter API key before running the application. The program will not work without it.
To run the application locally:
-
Clone the Repository:
git clone https://github.com/Gibirizon/solving-multiple-choice-questions-with-AI.git cd solving-multiple-choice-questions-with-AI -
Create a Virtual Environment and install dependencies:
- For
pipusers:
python3 -m venv .venv
source .venv/bin/activate # On Windows use `.venv\Scripts\activate`
pip install -e .- For
uvusers:
uv sync
source .venv/bin/activate # On Windows use `.venv\Scripts\activate`-
Set up OpenRouter API Key:
Create a
.envfile in the project root directory and add your OpenRouter API key:# Create .env file touch .envThen add your API key to the
.envfile:API_KEY=your_openrouter_api_key_here
[!NOTE] To get your OpenRouter API key:
- Visit OpenRouter
- Sign up or log in to your account
- Go to your dashboard and generate an API key
- Copy the key and paste it in your
.envfile
-
Run the Application:
python main.py-
Input Questions:
- Enter screenshots of multiple-choice questions from your files or just paste them with Ctrl-V when your cursor is in appropriate area.
-
Edit the text or use image:
- After importing screenshot of question you can edit the text taken from the photo with OCR or just use this screenshot directly to get better results.
-
Get Solutions:
- Click
Get answer to your questionto get AI-generated answers.
- Click
-
Export Solutions:
- Save answers to
.odtor.mdfiles by navigating toExporttab. You can also export this question as a flashcard to anki - powerful flashcards program. To export it toankiyou need to have AnkiConnect add-on installed.
- Save answers to
Made by Gibirizon ❤️

