File size: 627 Bytes
030876e | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | import sys
from huggingface_hub import hf_hub_download
def main() -> int:
try:
hf_hub_download(
repo_id="bullerwins/translategemma-27b-it-GGUF",
filename="translategemma-27b-it-Q8_0.gguf",
local_dir="/home/mshahidul/readctrl/models",
local_dir_use_symlinks=False,
)
return 0
except ImportError:
print("huggingface_hub not found. Install it and try again.", file=sys.stderr)
return 1
except Exception as exc:
print(str(exc), file=sys.stderr)
return 1
if __name__ == "__main__":
raise SystemExit(main())
|