Spaces:
Running
on
A10G
Running
on
A10G
Fix download pattern
Browse filesIt used to be something like ['*.md', '*.json', '*.model', '*', '.',
's', 'a', 'f', 'e', 't', 'e', 'n', 's', 'o', 'r', 's'] lol
app.py
CHANGED
@@ -5,10 +5,7 @@ import signal
|
|
5 |
os.environ["GRADIO_ANALYTICS_ENABLED"] = "False"
|
6 |
import gradio as gr
|
7 |
|
8 |
-
from huggingface_hub import
|
9 |
-
from huggingface_hub import snapshot_download
|
10 |
-
from huggingface_hub import whoami
|
11 |
-
from huggingface_hub import ModelCard
|
12 |
|
13 |
from gradio_huggingfacehub_search import HuggingfaceHubSearch
|
14 |
|
@@ -110,7 +107,7 @@ def process_model(model_id, q_method, use_imatrix, imatrix_q_method, private_rep
|
|
110 |
else "*.bin"
|
111 |
)
|
112 |
|
113 |
-
dl_pattern += pattern
|
114 |
|
115 |
api.snapshot_download(repo_id=model_id, local_dir=model_name, local_dir_use_symlinks=False, allow_patterns=dl_pattern)
|
116 |
print("Model downloaded successfully!")
|
|
|
5 |
os.environ["GRADIO_ANALYTICS_ENABLED"] = "False"
|
6 |
import gradio as gr
|
7 |
|
8 |
+
from huggingface_hub import HfApi, ModelCard, whoami
|
|
|
|
|
|
|
9 |
|
10 |
from gradio_huggingfacehub_search import HuggingfaceHubSearch
|
11 |
|
|
|
107 |
else "*.bin"
|
108 |
)
|
109 |
|
110 |
+
dl_pattern += [pattern]
|
111 |
|
112 |
api.snapshot_download(repo_id=model_id, local_dir=model_name, local_dir_use_symlinks=False, allow_patterns=dl_pattern)
|
113 |
print("Model downloaded successfully!")
|