File size: 928 Bytes
b5df735
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
#!/usr/bin/env python3
"""
Local mode startup script
Sets environment variables and starts the application in local mode
"""

import os
import sys

def main():
    """Start application in local mode"""
    
    print("🏠 Starting Gradio MCP Server in LOCAL mode")
    print("πŸ’‘ GPU functions will be routed to Modal endpoints")
    
    # Set deployment mode to local
    os.environ["DEPLOYMENT_MODE"] = "local"
    
    # Add parent directory to path for src imports
    current_dir = os.path.dirname(os.path.abspath(__file__))
    parent_dir = os.path.dirname(current_dir)
    sys.path.insert(0, parent_dir)
    
    # Import and run the app
    from src.app import run_local
    
    try:
        run_local()
    except KeyboardInterrupt:
        print("\nπŸ›‘ Server stopped by user")
    except Exception as e:
        print(f"❌ Error starting server: {e}")
        sys.exit(1)

if __name__ == "__main__":
    main()