File size: 792 Bytes
6640531
8ad5d56
b0b2c21
 
6640531
 
 
 
b0b2c21
 
 
 
 
 
8ad5d56
 
 
 
b0b2c21
 
 
8ad5d56
b0b2c21
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
from app import create_app
import os
import sys
import argparse

app = create_app()

if __name__ == '__main__':
    # Parse command line arguments
    parser = argparse.ArgumentParser(description='Run DP-SGD Explorer')
    parser.add_argument('--port', type=int, default=5000, help='Port to run the server on (default: 5000)')
    parser.add_argument('--host', type=str, default='127.0.0.1', help='Host to run the server on (default: 127.0.0.1)')
    args = parser.parse_args()
    
    # Enable debug mode for development
    app.config['DEBUG'] = True
    # Disable CORS in development
    app.config['CORS_HEADERS'] = 'Content-Type'
    
    print(f"Starting server on http://{args.host}:{args.port}")
    
    # Run the application
    app.run(host=args.host, port=args.port, debug=True)