This project is a basic AI model that generates a structured 2D layout based on predefined constraints. It uses FastAPI for the backend and Streamlit for visualization.
- AI-based layout optimization
- FastAPI server for API-based access
- Streamlit-based UI for visualization
- Uses Matplotlib for graphical representation
git clone https://github.com/manisaran30/Insyde-project.git
cd Insyde-projectpython -m venv venv- Windows:
venv\Scripts\activate
- Mac/Linux:
source venv/bin/activate
pip install -r requirements.txtuvicorn layout_optimizer:app --host 0.0.0.0 --port 5000 --reload- API available at: http://127.0.0.1:5000/docs
streamlit run layout_optimizer.py- UI available at: http://localhost:8501
curl -X 'GET' 'http://127.0.0.1:5000/' -H 'accept: application/json'curl -X 'POST' 'http://127.0.0.1:5000/generate' \
-H 'Content-Type: application/json' \
-d '{ "room_width": 10, "room_height": 8, "furniture": [{"name": "table", "width": 2, "height": 2}] }'If you see:
ImportError: DLL load failed while importing _pathRun:
pip uninstall -y matplotlib
pip cache purge
pip install --no-cache-dir matplotlibIf you get an error like:
[Errno 10048] error while attempting to bind on address ('0.0.0.0', 5000)Kill any existing processes using that port:
taskkill /F /IM python.exeThen restart the server.
Ensure you're using Python 3.9 or later:
python --versionIf not, upgrade Python from python.org.
- Fork the repository.
- Create a new branch (
feature-branch). - Commit your changes.
- Open a pull request.
This project is licensed under the MIT License.
For any issues, contact manisaran30.