Skip to content

Commit

Permalink
Use symlinked path for -mm
Browse files Browse the repository at this point in the history
  • Loading branch information
radare committed Oct 30, 2024
1 parent eba5741 commit 1dc00ff
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion r2ai/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,8 @@ def list_downloaded_models():
print(f" ??? {M}")
user_data_dir = appdirs.user_data_dir("r2ai")
models_path = os.path.join(user_data_dir, "models")
home_dir = os.path.expanduser("~")
sympath = os.path.join(home_dir, ".r2ai.models")
files = os.listdir(models_path)
for file in files:
if file.endswith(".gguf") == False:
Expand All @@ -392,7 +394,7 @@ def list_downloaded_models():
if last_part == file:
found = True
if not found:
M = f"{models_path}/{file}"
M = f"{sympath}/{file}"
size = round(os.path.getsize(M) / 1024 / 1024 / 1024, 2)
size = f"{size}".rjust(6)
print(f" {size}G {M}")
Expand Down

0 comments on commit 1dc00ff

Please sign in to comment.