Add warning if token is invalid (#7173)

This commit is contained in:
Galunid 2024-05-09 14:13:05 +02:00 committed by GitHub
parent fd9f92b154
commit f31ec120bc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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)