Add Mistral, Qwen, Gemini support; Fix minor bugs
This commit is contained in:
@@ -30,7 +30,7 @@ def _execute_command(command: List[str]) -> None:
|
||||
p = subprocess.Popen(command)
|
||||
p.wait()
|
||||
else:
|
||||
result = subprocess.run(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE, timeout=60, text=True)
|
||||
result = subprocess.run(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE, timeout=60, text=True, encoding="utf-8")
|
||||
if result.returncode != 0:
|
||||
raise Exception("\033[91m" + result.stdout + result.stderr + "\033[0m")
|
||||
return result.stdout
|
||||
|
||||
@@ -328,6 +328,9 @@ def check_structure_sim(src_path, tgt_path):
|
||||
Check if the structure of the two images are similar
|
||||
gimp:2a729ded-3296-423d-aec4-7dd55ed5fbb3
|
||||
"""
|
||||
if src_path is None or tgt_path is None:
|
||||
return 0.
|
||||
|
||||
img_src = Image.open(src_path)
|
||||
img_tgt = Image.open(tgt_path)
|
||||
structure_same = structure_check_by_ssim(img_src, img_tgt)
|
||||
|
||||
Reference in New Issue
Block a user