Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -2,10 +2,11 @@ import os
|
|
| 2 |
import gradio as gr
|
| 3 |
from epub2txt import epub2txt
|
| 4 |
|
| 5 |
-
os.
|
| 6 |
-
os.system("
|
| 7 |
-
os.system("
|
| 8 |
-
|
|
|
|
| 9 |
from fastllm_pytools import llm
|
| 10 |
model = llm.model("./chatglm2-6b-int4.flm")
|
| 11 |
prompt = os.getenv("prompt")
|
|
|
|
| 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; sudo python setup.py install")
|
| 8 |
+
# os.system("wget https://huggingface.co/huangyuyang/chatglm2-6b-int4.flm/resolve/main/chatglm2-6b-int4.flm")
|
| 9 |
+
|
| 10 |
from fastllm_pytools import llm
|
| 11 |
model = llm.model("./chatglm2-6b-int4.flm")
|
| 12 |
prompt = os.getenv("prompt")
|