Update app.py
Browse files
app.py
CHANGED
@@ -1,3 +1,4 @@
|
|
|
|
1 |
import gradio as gr
|
2 |
|
3 |
from uuid import uuid4
|
@@ -55,6 +56,10 @@ repo_name = "IlyaGusev/saiga_13b_lora_llamacpp"
|
|
55 |
model_name = "ggml-model-q4_1.bin"
|
56 |
embedder_name = "sentence-transformers/paraphrase-multilingual-mpnet-base-v2"
|
57 |
|
|
|
|
|
|
|
|
|
58 |
print("Downloading all files...")
|
59 |
snapshot_download(repo_id=repo_name, local_dir="/data/saiga_13b_lora_llamacpp", allow_patterns=model_name, cache_dir="/data")
|
60 |
snapshot_download(repo_id=embedder_name, local_dir="/data/paraphrase-multilingual-mpnet-base-v2", cache_dir="/data")
|
|
|
1 |
+
import shutil
|
2 |
import gradio as gr
|
3 |
|
4 |
from uuid import uuid4
|
|
|
56 |
model_name = "ggml-model-q4_1.bin"
|
57 |
embedder_name = "sentence-transformers/paraphrase-multilingual-mpnet-base-v2"
|
58 |
|
59 |
+
rm_files = [os.path.join("/data", f) for f in os.listdir("/data")]
|
60 |
+
for f in rm_files:
|
61 |
+
shutil.rmtree(f)
|
62 |
+
|
63 |
print("Downloading all files...")
|
64 |
snapshot_download(repo_id=repo_name, local_dir="/data/saiga_13b_lora_llamacpp", allow_patterns=model_name, cache_dir="/data")
|
65 |
snapshot_download(repo_id=embedder_name, local_dir="/data/paraphrase-multilingual-mpnet-base-v2", cache_dir="/data")
|