exec path fix

This commit is contained in:
glide-the 2024-03-31 19:48:04 +08:00
parent 6e9e31a32c
commit a21791db54
2 changed files with 7 additions and 4 deletions

View File

@ -64,8 +64,11 @@ def run_webui(started_event: mp.Event = None, run_mode: str = None):
host = WEBUI_SERVER["host"]
port = WEBUI_SERVER["port"]
st_exe = os.path.join(os.path.dirname(sys.executable),"scripts","streamlit")
# 判断系统是否为Windows
if sys.platform == "win32":
st_exe = os.path.join(os.path.dirname(sys.executable), "Scripts", "streamlit")
else:
st_exe = os.path.join(os.path.dirname(sys.executable),"streamlit")
script_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'webui.py')
cmd = [st_exe, "run", script_dir,
"--server.address", host,

View File

@ -30,13 +30,13 @@ pathlib = "~1.0.1"
pytest = "~7.4.3"
pyjwt = "2.8.0"
elasticsearch = "*"
numexpr = ">=2.8.8"
numexpr = ">=1" #test
strsimpy = ">=0.2.1"
markdownify = ">=0.11.6"
tqdm = ">=4.66.1"
websockets = ">=12.0"
numpy = "1.24.4"
pandas = "~2.1.4"
pandas = "~1" # test
pydantic = "2.6.4"
httpx = {version = ">=0.25.2", extras = ["brotli", "http2", "socks"]}
python-multipart = "0.0.9"