An AI-powered tool that converts Figma designs (from screenshots) into Python GUI code. Upload your design, and get ready-to-use Python code for various GUI frameworks!
- 🖼️ Upload Figma design screenshots
- 🔍 Intelligent layout analysis using OCR
- 🤖 AI-powered code generation using GPT-4
- 🎯 Support for multiple Python GUI frameworks:
- Tkinter
- PyQt6
- CustomTkinter
- ⚙️ Customizable settings
- 📥 Easy code download and copying
-
Install Python 3.8 or higher
-
Install Tesseract OCR:
# macOS brew install tesseract # Ubuntu/Debian sudo apt-get install tesseract-ocr # Windows # Download installer from: https://github.com/UB-Mannheim/tesseract/wiki
-
Install Python dependencies:
pip install -r requirements.txt
-
Get an OpenAI API key from: https://platform.openai.com/api-keys
-
Start the application:
streamlit run app.py
-
Enter your OpenAI API key in the sidebar
-
Upload a screenshot of your Figma design
-
Select your preferred Python GUI framework
-
Adjust advanced settings if needed
-
Get your generated Python code!
- Use clear, high-resolution screenshots
- Ensure text in the design is readable
- Keep the design relatively simple for better OCR accuracy
- Try different GUI frameworks to find the best match for your design
Feel free to open issues or submit pull requests for improvements!
MIT License - Feel free to use this tool for personal or commercial projects. # Figma2Python