Spaces:
Sleeping
Sleeping
File size: 1,385 Bytes
d9ea3f9 60da408 c9ba3ae d9ea3f9 c9ba3ae d9ea3f9 0d6622c c9ba3ae d9ea3f9 60da408 d9ea3f9 0d6622c 6eb2933 d9ea3f9 c9ba3ae 60da408 0d6622c d9ea3f9 0d6622c d9ea3f9 c9ba3ae d9ea3f9 f9d0aef 60da408 d9ea3f9 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
# 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() |