Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -4,7 +4,7 @@ import pandas as pd
|
|
| 4 |
|
| 5 |
def extract_tables_from_pdf(uploaded_file):
|
| 6 |
# Open the uploaded PDF file (this will be a file-like object)
|
| 7 |
-
doc = fitz.open(uploaded_file)
|
| 8 |
tables = []
|
| 9 |
|
| 10 |
for page_num in range(len(doc)):
|
|
|
|
| 4 |
|
| 5 |
def extract_tables_from_pdf(uploaded_file):
|
| 6 |
# Open the uploaded PDF file (this will be a file-like object)
|
| 7 |
+
doc = fitz.open(stream=uploaded_file.read()) # Use .read() to pass the file content as a stream
|
| 8 |
tables = []
|
| 9 |
|
| 10 |
for page_num in range(len(doc)):
|