Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions ramalama/huggingface.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import os
import urllib.request
from ramalama.common import run_cmd, exec_cmd, download_file, verify_checksum
from ramalama.common import available, run_cmd, exec_cmd, download_file, verify_checksum
from ramalama.model import Model

missing_huggingface = """
Expand All @@ -13,10 +13,9 @@

def is_huggingface_cli_available():
"""Check if huggingface-cli is available on the system."""
try:
run_cmd(["huggingface-cli", "version"])
if available("huggingface-cli"):
return True
except FileNotFoundError:
else:
print("huggingface-cli not found. Some features may be limited.\n" + missing_huggingface)
return False

Expand Down