π§ AI_CodeSolver π€
Welcome to AI_CodeSolver! π This is a powerful Python project that leverages state-of-the-art AI models to help you solve coding problems automatically! Whether you're a beginner or an expert, this tool will assist you in generating optimal solutions and executing them in a safe sandbox environment.
π§ AI_CodeSolver uses OpenAI's GPT-3, Google's Gemini, and E2B sandbox environments to analyze coding problems, generate solutions, and run them in real-time.
π§βπ» Features β¨
πΈ Image Processing: Upload an image of a coding problem, and the system will extract the problem description using advanced image recognition (powered by Gemini).
π Text Input: You can also directly type your coding problem.
π» Code Generation: The AI will generate a clean, efficient, and documented Python solution for your coding problem.
π Code Execution: Execute the generated solution in a secure sandbox environment, and get real-time results.
π Safe Environment: Run potentially unsafe or untrusted Python code without worrying about security issues using the E2B sandbox.
β‘ Optimized for LeetCode-like Problems: Designed to handle typical coding challenges with proper time and space complexity.
Prerequisites π
Python 3.x installed on your machine.
API keys for OpenAI, Gemini, and E2B (sandbox execution).
π₯οΈ How to Use π€
Input Coding Problem:
You can upload an image of a coding problem or directly type the problem in the text box.
Generate & Execute:
Once youβve entered the problem, hit the "Generate & Execute Solution" button to let the AI generate a solution and run the code.
Review the Results:
The AI will return the solution with a breakdown of the code.
The generated code will be executed in the E2B sandbox, and youβll get the results right on the platform.
Check Files (if any):
If the execution creates any files, theyβll be listed below the execution results for you to download.
π¨ UI/UX Overview π‘
Sidebar Configuration: On the left side, configure your API keys for OpenAI, Gemini, and E2B.
Main Area:
Input your coding problem as text or upload an image.
Get the AI-generated solution along with the execution results.
Real-time Feedback: See step-by-step execution logs and any generated files right after the code runs.
π§ Technologies Used βοΈ
Streamlit: The frontend framework to build the web interface.
OpenAI GPT-3: Used for generating Python solutions.
Google Gemini: For analyzing and extracting coding problems from images.
E2B Sandbox: A secure environment to run Python code without any security concerns.
π License π
This project is licensed under the MIT License.