This project is a simple web app built with Flask and OpenAI's GPT-4 API to analyze code based on user input.
- Python 3.x
- Flask: Install via
pip install flask
- OpenAI Python SDK: Install via
pip install openai
- OpenAI API Key: Get from OpenAI
- Clone the repo:
git clone https://github.com/shahinur-alam/Code-Explanation-and-Debugging-Tool.git cd Code-Explanation-and-Debugging-Tool
- Install dependencies:
pip install -r requirements.txt
- Replace the OpenAI API key in the code:
openai.api_key = 'your_openai_api_key_here'
- Run the app:
python app.py
Visit the app at http://127.0.0.1:5000/.
- app.py: Main app logic with Flask routes and OpenAI integration.
- templates/index.html: Web form for code input and task selection.
- Enter code and specify a task (e.g., "Review this code").
- Submit the form to get the analysis.