This project is a web application that translates English tasks into Python code using OpenAI's GPT-3.5-Turbo language model and Flask, a Python web framework.
As developers, we often come across situations where we need to translate English instructions or tasks into executable code. This web application leverages the power of AI to automate this translation process, saving time and effort.
Before getting started, make sure you have the following prerequisites:
- OpenAI API access and API key
- Python installed on your machine
- Flask installed in your Python environment
The project has the following structure:
requirements.txt
: Required Modulestext2py_webui.py
: Python file containing the Flask application codetemplates/home.html
: HTML template for rendering the outputREADME.md
: Project documentation (you're reading it!)
- Clone the repository:
git clone https://github.com/washingtonBrewologist/TextToPython.git
- Navigate to the project directory:
cd TextToPython
- Install the required dependencies: Note: Create a Conda Env if you know what your doing!
pip install -r requirements.txt
Run the Flask application:
python text2py_webui.py
Access the application in your browser at http://localhost:5000.
Enter your API key and tasks in English. Submit the form to generate the corresponding Python code.