From 32f29b9f7c04b5e7ebdf75eeb7ffab35b07d26be Mon Sep 17 00:00:00 2001 From: BuildTools Date: Tue, 20 Aug 2024 17:15:55 -0700 Subject: [PATCH] fix: update regex for progress tracking - update regex for progress tracking - add .env.example file - update .gitignore --- .env.example | 4 ++++ .gitignore | 5 ++--- src/AutoGGUF.py | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) create mode 100644 .env.example diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..216fdcd --- /dev/null +++ b/.env.example @@ -0,0 +1,4 @@ +AUTOGGUF_RESOLUTION=1650x1100 +AUTOGGUF_THEME= +AUTOGGUF_CHECK_BACKEND=enabled +AUTOGGUF_CHECK_UPDATE=enabled diff --git a/.gitignore b/.gitignore index 6586727..ce6dd8d 100644 --- a/.gitignore +++ b/.gitignore @@ -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 diff --git a/src/AutoGGUF.py b/src/AutoGGUF.py index b591d85..783c6d6 100644 --- a/src/AutoGGUF.py +++ b/src/AutoGGUF.py @@ -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))