syncmaster7 / app_launcher.py
aseelflihan's picture
Initial commit without node_modules
6609c06
#!/usr/bin/env python3
"""
App Launcher - ูŠุดุบู„ ุงู„ุชุทุจูŠู‚ ู…ุน ุงู„ุฎุงุฏู… ุงู„ู…ุฏู…ุฌ
"""
import os
import sys
# Add current directory to path
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
# Force start integrated server
print("๐Ÿš€ Starting integrated recorder server...")
try:
from integrated_server import integrated_server
# Force start the server
if not integrated_server.is_running:
result = integrated_server.start_recorder_server()
if result:
print("โœ… Recorder server started successfully")
else:
print("โš ๏ธ Warning: Could not start recorder server")
else:
print("โœ… Recorder server already running")
except Exception as e:
print(f"โŒ Error starting recorder server: {e}")
print("๐Ÿ“ฑ Loading main application...")
# Execute the app.py content directly
if __name__ == "__main__":
# If running directly, execute app.py
exec(open('app.py').read())
else:
# If imported by Streamlit, import and execute
try:
exec(open('app.py').read())
print("โœ… Application loaded successfully")
except Exception as e:
print(f"โŒ Error loading application: {e}")
raise