Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -184,8 +184,10 @@ def extract_text_from_file(file_path: str, file_ext: str) -> str:
|
|
184 |
tables = page.extract_tables()
|
185 |
if tables:
|
186 |
for table in tables:
|
187 |
-
text += "\n".join(
|
188 |
-
|
|
|
|
|
189 |
# Fall back to text extraction
|
190 |
page_text = page.extract_text()
|
191 |
if page_text:
|
|
|
184 |
tables = page.extract_tables()
|
185 |
if tables:
|
186 |
for table in tables:
|
187 |
+
text += "\n".join(
|
188 |
+
" | ".join(str(cell) for cell in row if cell is not None)
|
189 |
+
for row in table
|
190 |
+
) + "\n"
|
191 |
# Fall back to text extraction
|
192 |
page_text = page.extract_text()
|
193 |
if page_text:
|