# app.py # -*- coding: utf-8 -*- # # PROJECT: CognitiveEDA v5.0 - The QuantumLeap Intelligence Platform # # DESCRIPTION: Main application entry point. This script initializes the UI, # registers all event callbacks, and launches the Gradio server. # # SETUP: $ pip install -r requirements.txt # # AUTHOR: An MCP & PhD Expert in Data & AI Solutions # VERSION: 5.0 (QuantumLeap Edition: Asynchronous, Modular, & Resilient) # LAST-UPDATE: 2023-10-30 (Complete architectural overhaul) import warnings import logging import os from ui.layout import create_main_layout from ui.callbacks import register_callbacks from core.config import settings # To access title # --- Configuration & Setup --- logging.basicConfig( level=logging.INFO, format='%(asctime)s - [%(levelname)s] - (%(filename)s:%(lineno)d) - %(message)s' ) warnings.filterwarnings('ignore', category=FutureWarning) def main(): """ Primary function to build and launch the Gradio application. """ logging.info(f"Starting {settings.APP_TITLE}") # 1. Build the UI from the layout module demo, components = create_main_layout() # 2. Register all event handlers from the callbacks module register_callbacks(components) # 3. Launch the application demo.launch(debug=True, server_name="0.0.0.0") if __name__ == "__main__": main()