From 62aa3bfdb25f67cd3d15a559bd8e693e71a66182 Mon Sep 17 00:00:00 2001 From: Ettore Di Giacinto Date: Sat, 13 Jul 2024 11:36:20 +0200 Subject: [PATCH] fix(scripts): minor fixup to gallery scripts Signed-off-by: Ettore Di Giacinto --- scripts/latest_hf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/latest_hf.py b/scripts/latest_hf.py index 792a9639..b971a6bd 100644 --- a/scripts/latest_hf.py +++ b/scripts/latest_hf.py @@ -12,7 +12,7 @@ current_dir = os.path.dirname(os.path.realpath(__file__)) def get_latest_model(): search_term = "GGUF" - if sys.argv[1]: + if len(sys.argv) > 2 and sys.argv[1]: search_term = sys.argv[1] url = "https://huggingface.co/api/models" params = {"sort": "lastModified", "direction": -1, "limit": 30, "search": search_term}