Spaces:
Sleeping
Sleeping
File size: 1,354 Bytes
88fbdc0 | 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 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | #!/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")
|