Starter repo for ADs' codex vibe coding session
Create a simple web app involving image gen that could help one of your clients. Some ideas for inspiration:
- Product images for ecommerce platforms such as Amazon/Shopee, etc
- Posters for marketing
- Workflow diagram to visualise business process
- Charcter turnaround sheets for movie / anime production
- in terminal, type
python3 -m venv .venv source .venv/bin/activatepip install -r requirements.txtcp .env.example .env- replace
OPENAI_API_KEYin .env with actual OpenAI API Key
## Objective
Your task is to create a simple web app with Python backend and React frontend, that uses OpenAI's image-gen-1 model to edit uploaded image based on user prompt
## Frontend requirements
1. 2 columns, 1 column for taking in the prompt to generate the image, display the image. The other column takes in the generated image, with a prompt, to show the edited image
## Backend requirements
1. Two functions to create and edit image based on image-gen-1 model is available in the utils.py folder
1. `create_image` generates the image from image-gen-1 model, based on the input prompt and the desired output size. It returns the generated image in bytes format
2. `edit_image` edits the image based on image-gen-1 model, taking in the editting prompt and the image bytes and returns the edited image in bytes
## Folder access
- edits the code in /backend and /frontend folder.
- add all the necessary files for setup (e.g., package.json etc) at root folder
- strictly no access / edits in other folders
