From 8be9071ef582e2246adff54eb84e292083fd994f Mon Sep 17 00:00:00 2001 From: Bruce MacDonald Date: Wed, 28 Jun 2023 16:04:53 -0400 Subject: [PATCH] loading bar customizations --- README.md | 2 +- ollama/model.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 28836d0c..aaba81d5 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ pip install -e . ``` % ollama run huggingface.co/TheBloke/orca_mini_3B-GGML Pulling huggingface.co/TheBloke/orca_mini_3B-GGML... -Downloading [================> ] 66.67% (2/3) 30.2MB/s +Downloading [================ ] 66.67% 11.8MiB/s ... ... diff --git a/ollama/model.py b/ollama/model.py index 2620668a..c4028ba6 100644 --- a/ollama/model.py +++ b/ollama/model.py @@ -38,7 +38,7 @@ def pull(remote, models_home=".", *args, **kwargs): ) ) - print(f"Fetching model from {new_url}") + print(f"Pulling {parts.netloc}/{model}...") response = requests.get(new_url) response.raise_for_status() # Raises stored HTTPError, if one occurred @@ -81,6 +81,8 @@ def pull(remote, models_home=".", *args, **kwargs): unit_scale=True, unit_divisor=1024, initial=first_byte, + ascii=" ==", + bar_format="Downloading [{bar}] {percentage:3.2f}% {rate_fmt}{postfix}", ) as bar: for data in response.iter_content(chunk_size=1024): size = file.write(data)