Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -102,8 +102,8 @@ def _ensure_model_device():
|
|
102 |
def convert_files(pdf_path: str) -> list[Image.Image]:
|
103 |
"""Convert a single PDF path into a list of PIL Images (pages)."""
|
104 |
imgs = convert_from_path(pdf_path, thread_count=4)
|
105 |
-
if len(imgs) >=
|
106 |
-
raise gr.Error("The number of images in the dataset should be less than
|
107 |
return imgs
|
108 |
|
109 |
|
|
|
102 |
def convert_files(pdf_path: str) -> list[Image.Image]:
|
103 |
"""Convert a single PDF path into a list of PIL Images (pages)."""
|
104 |
imgs = convert_from_path(pdf_path, thread_count=4)
|
105 |
+
if len(imgs) >= 800:
|
106 |
+
raise gr.Error("The number of images in the dataset should be less than 800.")
|
107 |
return imgs
|
108 |
|
109 |
|