alibidaran commited on
Commit
0e958c5
·
verified ·
1 Parent(s): a5a9821

Update run.py

Browse files
Files changed (1) hide show
  1. run.py +25 -25
run.py CHANGED
@@ -1,26 +1,26 @@
1
- import threading
2
- import subprocess
3
-
4
- def run_streamlit():
5
- subprocess.run([
6
- "streamlit", "run", "streamlit_app.py",
7
- "--server.port", "8501",
8
- ])
9
-
10
- def run_static_files():
11
- subprocess.run(
12
- ["cd static && npx http-server"],
13
- shell=True
14
- )
15
-
16
- if __name__ == "__main__":
17
- # Start both servers in separate threads
18
- streamlit_thread = threading.Thread(target=run_streamlit)
19
- static_files_thread = threading.Thread(target=run_static_files)
20
-
21
- streamlit_thread.start()
22
- static_files_thread.start()
23
-
24
- # Wait for both servers to finish
25
- streamlit_thread.join()
26
  static_files_thread.join()
 
1
+ import threading
2
+ import subprocess
3
+
4
+ def run_streamlit():
5
+ subprocess.run([
6
+ "streamlit", "run", "./src/streamlit_app.py",
7
+ "--server.port", "8501",
8
+ ])
9
+
10
+ def run_static_files():
11
+ subprocess.run(
12
+ ["cd static && npx http-server"],
13
+ shell=True
14
+ )
15
+
16
+ if __name__ == "__main__":
17
+ # Start both servers in separate threads
18
+ streamlit_thread = threading.Thread(target=run_streamlit)
19
+ static_files_thread = threading.Thread(target=run_static_files)
20
+
21
+ streamlit_thread.start()
22
+ static_files_thread.start()
23
+
24
+ # Wait for both servers to finish
25
+ streamlit_thread.join()
26
  static_files_thread.join()