diff --git a/gui/main.py b/gui/main.py index e1bd571..103717f 100644 --- a/gui/main.py +++ b/gui/main.py @@ -27,6 +27,7 @@ def shot(target, width, height): error_ptr = lib.GetScreen(target, ctypes.byref(data), ctypes.byref(length), width, height) if error_ptr: + lib.Free(data) return None, ctypes.string_at(error_ptr).decode() else: image_bytes = ctypes.string_at(data, length.value) @@ -171,7 +172,7 @@ class MainWindow(QWidget): def solve_result(self, result): self.log_output.append(f"[INFO] Operating system version: {result}") - self.log_output.append("-" * 40) + self.log_output.append("-" * 70) def show_error(self, error_msg): self.log_output.append(f"[WARN] {error_msg}") diff --git a/gui/predict.py b/gui/predict.py index f476246..e7e6033 100644 --- a/gui/predict.py +++ b/gui/predict.py @@ -30,7 +30,7 @@ def solve(image_bytes): _result = class_labels[_predicted.item()] - print(f"\nPredicted result: {_result}") + # print(f"\nPredicted result: {_result}") return _result