A small Python Flask AI app. Users paste a Python error or broken code, and the app explains it in simple beginner English.
- Working public web page
- AI feature using OpenAI API
- Empty-input bug handled
/healthroute returns 200 OK for grader checks
Install dependencies:
pip install -r requirements.txtSet your API key:
setx OPENAI_API_KEY "your_api_key_here"Close and reopen the terminal after using setx.
export OPENAI_API_KEY="your_api_key_here"Run:
python app.pyOpen:
http://127.0.0.1:5000
You can deploy this on Render, Railway, or another Python hosting service.
Set environment variable:
OPENAI_API_KEY = your_api_key_here
Optional:
OPENAI_MODEL = gpt-5.5-mini
Start command:
gunicorn app:app- Live URL:
- 3 user feedback screenshots/quotes:
- QA bug handled:
Bug: Empty input made the app send a useless request.
- Found issue: User clicked Explain with empty box.
- Reproduced: I cleared the box and clicked Explain.
- Cause: The app did not validate input first.
- Fixed it: Added a check that tells the user to paste Python code/error first.
- Retested: Empty input now shows a clear warning and does not call the AI.