summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGalunid <karolek1231456@gmail.com>2024-05-09 14:13:05 +0200
committerGitHub <noreply@github.com>2024-05-09 14:13:05 +0200
commitf31ec120bc36c6270e4948e6a065a7c4cfa0c404 (patch)
tree5670c7976ea0a08377b25d020c1f1719a989a825
parentfd9f92b154850014146f61717cd292a59a5cee5a (diff)
Add warning if token is invalid (#7173)
-rwxr-xr-xconvert-hf-to-gguf-update.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/convert-hf-to-gguf-update.py b/convert-hf-to-gguf-update.py
index a26f45a5..6fdb502f 100755
--- a/convert-hf-to-gguf-update.py
+++ b/convert-hf-to-gguf-update.py
@@ -49,6 +49,10 @@ chktxt = '\n \n\n \n\n\n \t \t\t \t\n \n \n \n \nπŸš€ (normal) πŸ˜Άβ€
if len(sys.argv) == 2:
token = sys.argv[1]
+ if not token.startswith("hf_"):
+ logger.info("Huggingface token seems invalid")
+ logger.info("Usage: python convert-hf-to-gguf-update.py <huggingface_token>")
+ sys.exit(1)
else:
logger.info("Usage: python convert-hf-to-gguf-update.py <huggingface_token>")
sys.exit(1)