| | """ |
| | MediSync: Multi-Modal Medical Analysis System - Hugging Face Spaces Entry Point |
| | ============================================================================== |
| | This file serves as the entry point for Hugging Face Spaces deployment. |
| | """ |
| |
|
| | import sys |
| | import os |
| | import logging |
| | from pathlib import Path |
| |
|
| | |
| | logging.basicConfig( |
| | level=logging.INFO, |
| | format="%(asctime)s - %(name)s - %(levelname)s - %(message)s", |
| | handlers=[logging.StreamHandler()], |
| | ) |
| | logger = logging.getLogger(__name__) |
| |
|
| | |
| | current_dir = Path(__file__).resolve().parent |
| | sys.path.append(str(current_dir)) |
| |
|
| | |
| | try: |
| | logger.info("Initializing MediSync for Hugging Face Spaces") |
| | from mediSync.app import MediSyncApp |
| | |
| | |
| | app_instance = MediSyncApp() |
| | |
| | |
| | interface = app_instance.create_ui() |
| | |
| | |
| | app = interface |
| | |
| | except Exception as e: |
| | logger.error(f"Error initializing MediSync app: {e}") |
| | import traceback |
| | logger.error(traceback.format_exc()) |
| | raise |