Amarthya7's picture
Create app.py
e88e7d0 verified
raw
history blame
1.16 kB
"""
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
# Configure logging
logging.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 path
current_dir = Path(__file__).resolve().parent
sys.path.append(str(current_dir))
# Import and initialize the MediSyncApp
try:
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())
raise