-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
35 lines (29 loc) · 1.18 KB
/
Copy pathmain.py
File metadata and controls
35 lines (29 loc) · 1.18 KB
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
"""
Main entry point for the SuperMemory Video Annotation Platform
"""
import sys
import os
# Check Python version
if sys.version_info < (3, 10):
print("Error: Python 3.10 or higher is required.")
print(f"Current version: {sys.version_info.major}.{sys.version_info.minor}.{sys.version_info.micro}")
print("\nPlease upgrade Python:")
print(" - Visit https://www.python.org/downloads/")
print(" - Or use pyenv: pyenv install 3.10 && pyenv global 3.10")
sys.exit(1)
# Add src directory to path
sys.path.insert(0, os.path.join(os.path.dirname(__file__), 'src'))
from visualization.app import app
if __name__ == '__main__':
# Use debug mode only in development (when DEBUG env var is set)
debug_mode = os.getenv('DEBUG', 'False').lower() == 'true'
# For production, bind to localhost. For external access, set HOST env var to 0.0.0.0
host = os.getenv('HOST', 'localhost')
port = int(os.getenv('PORT', '5000'))
print("="*60)
print("Starting SuperMemory Video Annotation Platform")
print("="*60)
print(f"Server: http://{host}:{port}")
print(f"Debug mode: {debug_mode}")
print("="*60)
app.run(debug=debug_mode, host=host, port=port)