Spaces:
Runtime error
Runtime error
Upload app.py
Browse files
app.py
CHANGED
@@ -43,6 +43,9 @@ custom_css = r'''
|
|
43 |
'''
|
44 |
|
45 |
|
|
|
|
|
|
|
46 |
# ========== 适配 SillyTavern 的模版 ==========
|
47 |
def text_format(text: str, _env=None, **env):
|
48 |
if _env is not None:
|
@@ -110,8 +113,8 @@ with gr.Blocks() as setting:
|
|
110 |
from huggingface_hub import snapshot_download
|
111 |
os.mkdir("downloads")
|
112 |
os.mkdir("cache")
|
113 |
-
snapshot_download(repo_id='TheBloke/CausalLM-7B-GGUF',
|
114 |
-
|
115 |
|
116 |
# ========== 加载模型 ==========
|
117 |
model = StreamingLLM(model_path=setting_path.value,
|
|
|
43 |
'''
|
44 |
|
45 |
|
46 |
+
# ========== 存储的路径 ==========
|
47 |
+
print('HF_HOME', os.getenv("HF_HOME"))
|
48 |
+
|
49 |
# ========== 适配 SillyTavern 的模版 ==========
|
50 |
def text_format(text: str, _env=None, **env):
|
51 |
if _env is not None:
|
|
|
113 |
from huggingface_hub import snapshot_download
|
114 |
os.mkdir("downloads")
|
115 |
os.mkdir("cache")
|
116 |
+
tmp = snapshot_download(repo_id='TheBloke/CausalLM-7B-GGUF', local_files_only=True, allow_patterns='causallm_7b.Q5_K_M.gguf')
|
117 |
+
print('snapshot_download', tmp)
|
118 |
|
119 |
# ========== 加载模型 ==========
|
120 |
model = StreamingLLM(model_path=setting_path.value,
|