"""Fullstack Code Builder — entry point. Uses MiniCPM5-1B (text) or MiniCPM-V-4.6 (vision+text) for local inference. No external APIs required. Supports generating fullstack applications in any language. Can push generated projects to HuggingFace Hub. Web search via Google scraping (no API keys needed). Gradio app support for Python. Image understanding with MiniCPM-V-4.6. Project structure: code/ ├── config/constants.py App constants, model configs, system prompt ├── model/loader.py Dual model loading & switching ├── model/inference.py Streaming inference (text + VLM) ├── execution/code_extractor.py Code extraction & language normalization ├── execution/python_runner.py Sandboxed Python execution ├── execution/gradio_runner.py Gradio app subprocess runner ├── websearch/google_scraper.py Web search scraping (no API) ├── huggingface/push.py HuggingFace Hub push & ZIP packaging ├── server/chat_helpers.py Chat history & prompt building └── server/routes.py FastAPI / Gradio server routes """ from __future__ import annotations import logging from code.model.loader import start_background_load from code.server.routes import get_app logging.basicConfig(level=logging.INFO) logger = logging.getLogger(__name__) # Start loading default model in background start_background_load() # Launch the server application = get_app() application.launch(show_error=True)