Spaces:
Sleeping
Sleeping
| #!/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") | |