syncmaster8 / main.py
aseelflihan's picture
Initial commit without node_modules
33d3592
#!/usr/bin/env python3
"""
Simple launcher for SyncMaster with integrated server
ู…ูุดุบู„ ุจุณูŠุท ู…ุน ุฎุงุฏู… ู…ุชูƒุงู…ู„ - ู…ุซุงู„ูŠ ู„ู€ HuggingFace
"""
import streamlit as st
import os
import sys
import time
# Add current directory to path
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
# Initialize integrated server first
recorder_server_started = False
def start_integrated_server():
"""Start the integrated recorder server"""
global recorder_server_started
if recorder_server_started:
return True
try:
from integrated_server import ensure_recorder_server
result = ensure_recorder_server()
if result:
recorder_server_started = True
st.success("โœ… Integrated recorder server is running on port 5001")
else:
st.warning("โš ๏ธ Could not start integrated recorder server")
return result
except Exception as e:
st.error(f"โŒ Error starting integrated recorder server: {e}")
return False
# Start the integrated server when the module loads
start_integrated_server()
# Import the main app module
try:
import app
except Exception as e:
st.error(f"โŒ Error loading main application: {e}")
st.stop()
if __name__ == "__main__":
print("๐Ÿš€ SyncMaster main.py executed directly")