-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun_webui.py
More file actions
54 lines (39 loc) · 1.37 KB
/
Copy pathrun_webui.py
File metadata and controls
54 lines (39 loc) · 1.37 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#!/usr/bin/env python3
import subprocess
import sys
import os
import signal
import time
from threading import Thread
def run_agent():
print("Starting Voice Agent...")
subprocess.run([sys.executable, "agent.py", "dev"])
def run_webui():
print("Starting WebUI Server...")
subprocess.run([sys.executable, "webui_server.py"])
def main():
agent_process = None
webui_process = None
try:
print("🎙️ Voice Agent Prototype - Starting Services")
print("=" * 50)
agent_process = subprocess.Popen([sys.executable, "agent.py", "dev"])
print("✅ Agent started")
time.sleep(2)
webui_process = subprocess.Popen([sys.executable, "webui_server.py"])
print("✅ WebUI started")
print("\n🌐 WebUI available at: http://localhost:5000")
print("🤖 Agent running in background")
print("\nPress Ctrl+C to stop all services")
agent_process.wait()
except KeyboardInterrupt:
print("\n\n🛑 Shutting down services...")
if agent_process:
agent_process.terminate()
print("✅ Agent stopped")
if webui_process:
webui_process.terminate()
print("✅ WebUI stopped")
print("👋 Goodbye!")
if __name__ == "__main__":
main()