diff --git a/setup.py b/setup.py index 85e0349..6d292ac 100644 --- a/setup.py +++ b/setup.py @@ -15,7 +15,7 @@ def load_requirements(filename='requirements.txt'): setup( name="table2html", - version="1.4.0", + version="1.4.1", author="TraiPPN", license='Apache License 2.0', author_email="phamphungoctraivl@gmail.com", diff --git a/table2html/main.py b/table2html/main.py index 0ae2588..e0007cf 100644 --- a/table2html/main.py +++ b/table2html/main.py @@ -32,12 +32,14 @@ def __init__( def TableDetect(self, image): tables = self.table_detector(image) - return [ - { + if len(tables): + return [ + { "table_bbox": table, } - for table in tables - ] + for table in tables + ] + return [] def StructureDetect(self, table_image): # Detect rows and columns