Amarthya7 commited on
Commit
a2cae12
·
verified ·
1 Parent(s): 5cec27c

Delete app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -50
app.py DELETED
@@ -1,50 +0,0 @@
1
- """
2
- MediSync: Multi-Modal Medical Analysis System - Hugging Face Spaces Entry Point
3
- ==============================================================================
4
- This file serves as the entry point for Hugging Face Spaces deployment.
5
- """
6
-
7
- import logging
8
- import sys
9
- from pathlib import Path
10
-
11
- # Configure logging
12
- logging.basicConfig(
13
- level=logging.INFO,
14
- format="%(asctime)s - %(name)s - %(levelname)s - %(message)s",
15
- handlers=[logging.StreamHandler()],
16
- )
17
- logger = logging.getLogger(__name__)
18
-
19
- # Add the current directory to Python path
20
- current_dir = Path(__file__).resolve().parent
21
- sys.path.append(str(current_dir))
22
-
23
- # Import and initialize the MediSync app
24
- try:
25
- logger.info("Initializing MediSync for Hugging Face Spaces")
26
- from mediSync.app import create_interface
27
-
28
- # Create the interface - this function creates the MediSyncApp instance internally
29
- # and returns the Gradio interface
30
- interface = create_interface()
31
-
32
- # For Hugging Face Spaces compatibility
33
- app = interface
34
-
35
- except Exception as e:
36
- logger.error(f"Error initializing MediSync app: {e}")
37
- import traceback
38
-
39
- logger.error(traceback.format_exc())
40
-
41
- # Create a fallback interface with error message
42
- import gradio as gr
43
-
44
- app = gr.Interface(
45
- fn=lambda: "MediSync failed to initialize. Please check logs for details.",
46
- inputs=None,
47
- outputs=gr.Textbox(),
48
- title="MediSync Error",
49
- description=f"Error initializing app: {str(e)}",
50
- )