Fix bugs in multiple examples
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user