This Flask-based AI application allows you to create beautiful CustomTkinter desktop UIs just by describing them in natural language. Powered by Google's Gemini API, it instantly generates Python code, provides a live preview, and lets you interactively refine your design through conversation.
- Natural Language UI Generation: Describe your UI in plain English (e.g., "make a dark-themed login screen with a password field")
- Live Preview: Instantly see your generated UI in action
- Interactive Refinement: Chat with the AI to tweak your design ("make the button red" or "move it to the right")
- Custom Instructions: Add specific guidelines to direct how the AI builds your UI
- Code Export: Download the complete Python code to use as a foundation for your project
- Clone this repository
- Install the required dependencies:
pip install -r requirements.txt - Get a Gemini API key from Google AI Studio
- Add your API key to the
.envfile:GEMINI_API_KEY=your_api_key_here - Run the application:
python app.py - Open your browser and navigate to
http://127.0.0.1:5000
- Describe Your UI: Enter a description of the UI you want to create in the input field.
- Generate UI: Click the "Generate UI" button to create your CustomTkinter interface.
- Refine Your Design: Use the chat to request changes or improvements to your UI.
- Add Custom Instructions: Set specific guidelines for how the AI should generate UIs.
- Export Code: Download the Python code to use in your own projects.
- Python 3.7+
- Flask
- Google Generative AI Python SDK
- CustomTkinter
- Pillow
- python-dotenv
- "Create a dark mode app with a sidebar navigation and main content area"
- "Generate a login form with username and password fields, remember me checkbox, and login button"
- "Make a file browser interface with a tree view and preview pane"
- "Design a settings page with toggles for dark mode, notifications, and sound"
- The AI may occasionally generate code that needs minor adjustments
- Complex UI layouts might require iterative refinements
- The preview functionality depends on your local environment setup
MIT