-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathrun_app.py
More file actions
41 lines (33 loc) · 800 Bytes
/
run_app.py
File metadata and controls
41 lines (33 loc) · 800 Bytes
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
"""
@FileName:run_app.py.py
@Author:Huterox
@Description:Go For It
@Time:2024/6/11 11:42
@Copyright:©2018-2024 awesome!
"""
import os
import sys
from base import run_app
import streamlit.web.cli as stcli
def resolve_path(path):
resolved_path = os.path.abspath(os.path.join(os.getcwd(), path))
return resolved_path
def run_app_path():
os.makedirs(run_app,exist_ok=True)
out = f"{run_app}/main.py"
return out
if __name__ == "__main__":
# sys.argv = [
# "streamlit",
# "run",
# resolve_path("main.py"),
# "--global.developmentMode=false",
# ]
sys.argv = [
"streamlit",
"run",
run_app_path(),
"--server.port=8080",
"--global.developmentMode=false",
]
sys.exit(stcli.main())