From 108e30f1f946b643af5d50558a255bc2b1a7287e Mon Sep 17 00:00:00 2001 From: leafspark <78000825+leafspark@users.noreply.github.com> Date: Fri, 2 Aug 2024 21:28:40 -0700 Subject: [PATCH] delete temp file --- src/modify.py | 35 ----------------------------------- 1 file changed, 35 deletions(-) delete mode 100644 src/modify.py diff --git a/src/modify.py b/src/modify.py deleted file mode 100644 index e507dbf..0000000 --- a/src/modify.py +++ /dev/null @@ -1,35 +0,0 @@ -import re - -def modify_file(filename): - with open(filename, 'r') as file: - content = file.read() - - # Replace validate_quantization_inputs method - content = re.sub( - r'def validate_quantization_inputs\(self\):.*?if not self\.backend_input\.text\(\):.*?raise ValueError\("Backend path is required"\)', - 'def validate_quantization_inputs(self):\n if not self.backend_combo.currentData():\n raise ValueError("No backend selected")', - content, flags=re.DOTALL - ) - - # Replace in generate_imatrix method - content = re.sub( - r'backend_path = self\.backend_input\.text\(\)', - 'backend_path = self.backend_combo.currentData()', - content - ) - - # Remove browse_backend method - content = re.sub( - r'def browse_backend\(self\):.*?ensure_directory\(backend_path\)\n', - '', - content, flags=re.DOTALL - ) - - # Write the modified content back to the file - with open(filename, 'w') as file: - file.write(content) - - print(f"File {filename} has been modified.") - -# Use the function -modify_file('AutoGGUF.py')