mirror of
https://github.com/ollama/ollama.git
synced 2025-05-11 18:36:41 +02:00
progress: fix bar rate
This commit is contained in:
parent
e1a69d44c9
commit
424d53ac70
3 changed files with 125 additions and 81 deletions
|
@ -37,6 +37,8 @@ func HumanBytes(b int64) string {
|
|||
switch {
|
||||
case value >= 100:
|
||||
return fmt.Sprintf("%d %s", int(value), unit)
|
||||
case value >= 10:
|
||||
return fmt.Sprintf("%d %s", int(value), unit)
|
||||
case value != math.Trunc(value):
|
||||
return fmt.Sprintf("%.1f %s", value, unit)
|
||||
default:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue