npc0 commited on
Commit
9ef7b0b
1 Parent(s): f200122

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -8,7 +8,9 @@ if not os.path.exists(os.getenv("checkpoint_path")):
8
  os.system("git clone --recurse-submodules https://github.com/ztxz16/fastllm.git")
9
  os.system("cd fastllm; mkdir build; cd build; cmake ..; make -j; cd tools; python setup.py install --user --prefix=")
10
  os.system("wget https://huggingface.co/huangyuyang/chatglm2-6b-int4.flm/resolve/main/chatglm2-6b-int4.flm")
11
- subprocess.Popen("uvicorn api:app --reload", cwd=os.path.dirname(os.path.abspath(__file__)))
 
 
12
 
13
  class GUI:
14
  def __init__(self, *args, **kwargs):
 
8
  os.system("git clone --recurse-submodules https://github.com/ztxz16/fastllm.git")
9
  os.system("cd fastllm; mkdir build; cd build; cmake ..; make -j; cd tools; python setup.py install --user --prefix=")
10
  os.system("wget https://huggingface.co/huangyuyang/chatglm2-6b-int4.flm/resolve/main/chatglm2-6b-int4.flm")
11
+ my_env = os.environ.copy()
12
+ # my_env["PATH"] = f"/usr/sbin:/sbin:{my_env['PATH']}"
13
+ subprocess.Popen("uvicorn api:app --reload", env=my_env)
14
 
15
  class GUI:
16
  def __init__(self, *args, **kwargs):