Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,12 +1,14 @@
|
|
1 |
import os
|
|
|
2 |
import gradio as gr
|
3 |
from epub2txt import epub2txt
|
4 |
|
5 |
if not os.path.exists("./chatglm2-6b-int4.flm"):
|
6 |
os.system("git clone --recurse-submodules https://github.com/ztxz16/fastllm.git")
|
7 |
os.system("cd fastllm; mkdir build; cd build; cmake ..; make -j; cd tools; python setup.py install --user --prefix=")
|
8 |
-
os.system("wget https://huggingface.co/huangyuyang/chatglm2-6b-int4.flm/resolve/main/chatglm2-6b-int4.flm")
|
9 |
-
|
|
|
10 |
|
11 |
from fastllm_pytools import llm
|
12 |
model = llm.model("./chatglm2-6b-int4.flm")
|
|
|
1 |
import os
|
2 |
+
import pip
|
3 |
import gradio as gr
|
4 |
from epub2txt import epub2txt
|
5 |
|
6 |
if not os.path.exists("./chatglm2-6b-int4.flm"):
|
7 |
os.system("git clone --recurse-submodules https://github.com/ztxz16/fastllm.git")
|
8 |
os.system("cd fastllm; mkdir build; cd build; cmake ..; make -j; cd tools; python setup.py install --user --prefix=")
|
9 |
+
# os.system("wget https://huggingface.co/huangyuyang/chatglm2-6b-int4.flm/resolve/main/chatglm2-6b-int4.flm")
|
10 |
+
pip._internal.main(['install', '-e', 'fastllm/build/tools/', '--user'])
|
11 |
+
# exit()
|
12 |
|
13 |
from fastllm_pytools import llm
|
14 |
model = llm.model("./chatglm2-6b-int4.flm")
|