File size: 1,061 Bytes
fa0aa74
 
176be12
fa0aa74
 
 
 
 
 
176be12
fa0aa74
 
 
 
176be12
fa0aa74
 
176be12
fa0aa74
 
 
176be12
fa0aa74
 
 
 
176be12
fa0aa74
 
 
 
176be12
fa0aa74
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
import subprocess
import time

def run_process(command):
    """
    Function to run a command in a separate terminal window.
    This is platform-dependent; works for Windows (cmd) in this example.
    """
    return subprocess.Popen(['start', 'cmd', '/k', command], shell=True)

if __name__ == "__main__":
    # Step 1: Run the data upload script
    print("Running upload_data_manually.py...")
    subprocess.call('python src\\upload_data_manually.py', shell=True)

    # Give some time for the upload script to complete
    time.sleep(5)

    # Step 2: Run the reference server
    print("Starting reference_serve.py in a new terminal...")
    run_process('python src\\reference_serve.py')

    # Step 3: Run the LLM service
    time.sleep(2)
    print("Starting llm_service.py in a new terminal...")
    run_process('python src\\llm_service.py')

    # Step 4: Run the app
    time.sleep(2)
    print("Starting app.py in a new terminal...")
    run_process('python src\\app.py')

    print("All services are running. Check the separate terminal windows.")