Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
ollama
Commits
8be9071e
Commit
8be9071e
authored
Jun 28, 2023
by
Bruce MacDonald
Browse files
loading bar customizations
parent
99ad4d0c
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
+4
-2
README.md
README.md
+1
-1
ollama/model.py
ollama/model.py
+3
-1
No files found.
README.md
View file @
8be9071e
...
@@ -34,7 +34,7 @@ pip install -e .
...
@@ -34,7 +34,7 @@ pip install -e .
```
```
% ollama run huggingface.co/TheBloke/orca_mini_3B-GGML
% ollama run huggingface.co/TheBloke/orca_mini_3B-GGML
Pulling huggingface.co/TheBloke/orca_mini_3B-GGML...
Pulling huggingface.co/TheBloke/orca_mini_3B-GGML...
Downloading [================
>
] 66.67%
(2/3) 30.2M
B/s
Downloading [================
] 66.67%
11.8Mi
B/s
...
...
...
...
...
...
ollama/model.py
View file @
8be9071e
...
@@ -38,7 +38,7 @@ def pull(remote, models_home=".", *args, **kwargs):
...
@@ -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
=
requests
.
get
(
new_url
)
response
.
raise_for_status
()
# Raises stored HTTPError, if one occurred
response
.
raise_for_status
()
# Raises stored HTTPError, if one occurred
...
@@ -81,6 +81,8 @@ def pull(remote, models_home=".", *args, **kwargs):
...
@@ -81,6 +81,8 @@ def pull(remote, models_home=".", *args, **kwargs):
unit_scale
=
True
,
unit_scale
=
True
,
unit_divisor
=
1024
,
unit_divisor
=
1024
,
initial
=
first_byte
,
initial
=
first_byte
,
ascii
=
" =="
,
bar_format
=
"Downloading [{bar}] {percentage:3.2f}% {rate_fmt}{postfix}"
,
)
as
bar
:
)
as
bar
:
for
data
in
response
.
iter_content
(
chunk_size
=
1024
):
for
data
in
response
.
iter_content
(
chunk_size
=
1024
):
size
=
file
.
write
(
data
)
size
=
file
.
write
(
data
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment