mirror of
https://github.com/nexy7574/LCC-bot.git
synced 2024-09-19 18:16:34 +01:00
Update ollama download status
This commit is contained in:
parent
336cd4754a
commit
ddd772cd2a
1 changed files with 4 additions and 2 deletions
|
@ -1846,8 +1846,10 @@ class OtherCog(commands.Cog):
|
||||||
completed = chunk["completed"] or 1 # avoid division by zero
|
completed = chunk["completed"] or 1 # avoid division by zero
|
||||||
total = chunk["total"] or 1
|
total = chunk["total"] or 1
|
||||||
percent = round(completed / total * 100)
|
percent = round(completed / total * 100)
|
||||||
if not percent % 10:
|
if percent == 100 and completed != total:
|
||||||
await msg.edit(content=f"`{chunk['status']}` - {percent:.0f}%")
|
percent = round(completed / total * 100, 2)
|
||||||
|
if not percent % 10 or percent >= 90.5:
|
||||||
|
await msg.edit(content=f"`{chunk['status']}` - {percent}%")
|
||||||
else:
|
else:
|
||||||
await msg.edit(content=f"`{chunk['status']}`")
|
await msg.edit(content=f"`{chunk['status']}`")
|
||||||
elif response.status_code != 200:
|
elif response.status_code != 200:
|
||||||
|
|
Loading…
Reference in a new issue