修复一些错误代码

This commit is contained in:
2025-03-28 21:59:57 +08:00
parent c524c513d2
commit 891cf2a84f
2 changed files with 3 additions and 2 deletions

View File

@@ -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}")

View File

@@ -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