A powerful multimodal coding assistant that can analyze images containing code problems and generate solutions in multiple programming languages. Built with Google's Gemini AI and Gradio for an intuitive web interface.
- Image Processing: Upload screenshots of coding problems or code snippets
- Text Input: Describe coding problems in natural language
- Smart Recognition: Automatically detects problem types and requirements
- Python: Full execution with safety restrictions
- JavaScript/TypeScript: Modern ES6+ and TypeScript support
- Java: Complete compilation and execution
- C/C++: GCC/G++ compiler integration
- HTML/CSS: Syntax validation and web project generation
- TSX: React TypeScript components
- Complete Websites: Generate full HTML, CSS, and JavaScript projects
- Responsive Design: Mobile-friendly, modern web standards
- Auto-Save: Automatically organize and save multi-file projects
- Ready-to-Deploy: Generated projects work out of the box
- Sandboxed Environment: Restricted execution for security
- Module Filtering: Only allows safe standard library modules
- Timeout Protection: Prevents infinite loops and hanging processes
- Error Handling: Comprehensive error reporting and suggestions
- Python 3.8 or higher
- Google Gemini API key
- (Optional) Compilers for specific languages:
- Node.js for JavaScript/TypeScript
- JDK for Java
- GCC/G++ for C/C++
-
Clone the repository
git clone <your-repo-url> cd yehh
-
Install dependencies
pip install -r requirements.txt
-
Get your Gemini API key
- Visit Google AI Studio
- Create a new API key
- Keep it ready for the application
-
Run the application
python app.py
-
Open your browser
- Navigate to the URL shown in the terminal (typically
http://localhost:7860
) - Enter your Gemini API key
- Start coding!
- Navigate to the URL shown in the terminal (typically
1. Upload an image containing a coding problem
2. Select your target programming language
3. Click "Generate & Execute Solution"
4. Get code generation + execution results
- "Write a function to reverse a string in Python"
- "Create a responsive login form using HTML, CSS, and JS"
- "Build a calculator class in Java"
- "Make a MVP landing page"
Input: "Create a modern portfolio website"
Output: Complete project with:
βββ index.html (Semantic HTML5)
βββ styles.css (Responsive CSS)
βββ script.js (Interactive JavaScript)
Trigger automatic web project generation with keywords:
landing page
,website
,web app
MVP
,portfolio
,dashboard
html css js
,full website
- Python: Executes safely with restricted imports
- JavaScript: Requires Node.js installation
- Java: Compiles and runs with JDK
- C/C++: Compiles with GCC/G++ and executes
- HTML/CSS: Validates syntax and structure
- API Errors: Graceful handling of service unavailability
- Compilation Errors: Clear error messages and fix suggestions
- Runtime Errors: Detailed execution analysis and debugging help
yehh/
βββ app.py # Main application file
βββ requirements.txt # Python dependencies
βββ README.md # Project documentation
βββ LICENSE # MIT License
βββ .gitignore # Git ignore patterns
βββ image.png # Sample image for testing
βββ generated_project/ # Auto-generated web projects
βββ index.html
βββ styles.css
βββ script.js
- Restricted Execution: Limited to safe operations only
- Module Filtering: Prevents dangerous imports
- Timeout Controls: Automatic termination of long-running code
- File System Protection: No unauthorized file access
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
503 Service Unavailable Error
- Gemini API is temporarily down
- Wait a few minutes and retry
- Use text input instead of image upload
Import/Module Errors
- Run
pip install -r requirements.txt
to install all dependencies - If you get
google-genai
errors, run:pip install google-genai
- For agno installation issues, try:
pip install agno --upgrade
Execution Errors
- Ensure required compilers are installed
- Check language-specific prerequisites
- Review generated code for syntax errors
API Key Issues
- Verify your Gemini API key is valid
- Check API quotas and limits
- Ensure vision API access is enabled
- Support for more programming languages (Go, Rust, etc.)
- Advanced code optimization suggestions
- Integration with popular IDEs
- Collaborative coding features
- Custom execution environments
- API endpoint for programmatic access
This project is licensed under the MIT License - see the LICENSE file for details.
- Google Gemini: For powerful multimodal AI capabilities
- Gradio: For the intuitive web interface
- Agno: For seamless AI agent integration
- Community: For testing and feedback
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Email: [email protected]
**Made with β€οΈ by hari7261
Transform your coding workflow with AI-powered multimodal assistance!