Spaces:
Runtime error
Runtime error
Create app.py
Browse files123456789101112131415161718192021222324252627282930313233343536373839404142"""MediSync: Multi-Modal Medical Analysis System - Hugging Face Spaces Entry Point==============================================================================This file serves as the entry point for Hugging Face Spaces deployment."""
import sysimport osimport loggingfrom pathlib import Path
# Configure logginglogging.basicConfig( level=logging.INFO, format="%(asctime)s - %(name)s - %(levelname)s - %(message)s", handlers=[logging.StreamHandler()],)logger = logging.getLogger(__name__)
# Add the current directory to Python pathcurrent_dir = Path(__file__).resolve().parentsys.path.append(str(current_dir))
# Import and initialize the MediSyncApptry: logger.info("Initializing MediSync for Hugging Face Spaces") from mediSync.app import MediSyncApp # Create the app instance app_instance = MediSyncApp() # Create the interface interface = app_instance.create_ui() # For Hugging Face Spaces compatibility app = interface except Exception as e: logger.error(f"Error initializing MediSync app: {e}") import traceback logger.error(traceback.format_exc()) raiseapp.pyAdded+42