File size: 658 Bytes
0e958c5
 
 
 
 
1923c36
0e958c5
 
 
a59edd3
 
 
 
 
1114ca8
0e958c5
 
 
a59edd3
1114ca8
e9117e0
1114ca8
0e958c5
 
 
a59edd3
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
import threading
import subprocess

def run_streamlit():
    subprocess.run([
        "streamlit", "run", "src/streamlit_app.py",
        "--server.port", "8501",
    ])

# def run_static_files():
#     subprocess.run(
#         ["cd static && npx http-server"],
#         shell=True
#     )

if __name__ == "__main__":
    # Start both servers in separate threads
    streamlit_thread = threading.Thread(target=run_streamlit)
    # static_files_thread = threading.Thread(target=run_static_files)

    streamlit_thread.start()
    static_files_thread.start()

    # Wait for both servers to finish
    streamlit_thread.join()
    # static_files_thread.join()