AzizWazir commited on
Commit
6a36c82
·
verified ·
1 Parent(s): bf42501

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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)):