fix: update regex for progress tracking

- update regex for progress tracking
- add .env.example file
- update .gitignore
This commit is contained in:
BuildTools 2024-08-20 17:15:55 -07:00
parent 3b96deb9c1
commit 32f29b9f7c
No known key found for this signature in database
GPG Key ID: 3270C066C15D530B
3 changed files with 7 additions and 4 deletions

4
.env.example Normal file
View File

@ -0,0 +1,4 @@
AUTOGGUF_RESOLUTION=1650x1100
AUTOGGUF_THEME=
AUTOGGUF_CHECK_BACKEND=enabled
AUTOGGUF_CHECK_UPDATE=enabled

5
.gitignore vendored
View File

@ -13,6 +13,8 @@ __pycache__/
# Allow these files
!.pre-commit-config.yaml
!.env.example
!setup.py
# Allow src folder and its .py files
!src/
@ -41,6 +43,3 @@ assets/*
# Don't ignore .gitignore
!.gitignore
# Allow PyPI setup script
!setup.py

View File

@ -1400,7 +1400,7 @@ def quantize_model(self):
def parse_progress(self, line, task_item):
# Parses the output line for progress information and updates the task item.
match = re.search(r"\[(\d+)/(\d+)\]", line)
match = re.search(r"\[\s*(\d+)\s*/\s*(\d+)\s*\].*", line)
if match:
current = int(match.group(1))
total = int(match.group(2))