Fix bugs in multiple examples

This commit is contained in:
Timothyxxx
2024-03-11 00:26:59 +08:00
parent 3f21519b78
commit b4cb64d861
2 changed files with 12 additions and 13 deletions

View File

@@ -178,6 +178,9 @@ import typing
def compare_pdf_images(pdf1_path: str, pdf2_path: str, **kwargs) -> float:
if not pdf1_path or not pdf2_path:
return 0.
def extract_images_from_pdf(pdf_path):
pdf_document = fitz.open(pdf_path)
images = []
@@ -396,16 +399,3 @@ def is_added_to_steam_cart(active_tab_info, rule):
return 0.
return 1.
if __name__ == '__main__':
result = compare_archive(
r"C:\Users\tianbaox\Desktop\DesktopEnv\cache\0e5303d4-8820-42f6-b18d-daf7e633de21\lecture_slides.zip",
r"C:\Users\tianbaox\Desktop\DesktopEnv\cache\0e5303d4-8820-42f6-b18d-daf7e633de21\gold_lecture_slides.zip",
**{
"file_path": "lecture_slides",
"file_type": "pdf"
})
print(result)