Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -52,7 +52,8 @@ def show_pdf(file_path):
|
|
52 |
# read the pdf and parse it using stream
|
53 |
if input_pdf is not None:
|
54 |
table = camelot.read_pdf('input.pdf', flavor='stream',split_text = True,layout_kwargs={'detect_vertical':True},backend='poppler')
|
55 |
-
df =
|
|
|
56 |
df = df.dropna(axis=1, thresh=int(len(df)*0.7),inplace=True)
|
57 |
|
58 |
st.sidebar.markdown('Extract tables from PDF')
|
|
|
52 |
# read the pdf and parse it using stream
|
53 |
if input_pdf is not None:
|
54 |
table = camelot.read_pdf('input.pdf', flavor='stream',split_text = True,layout_kwargs={'detect_vertical':True},backend='poppler')
|
55 |
+
df = table[0].df
|
56 |
+
df = pd.DataFrame(df)
|
57 |
df = df.dropna(axis=1, thresh=int(len(df)*0.7),inplace=True)
|
58 |
|
59 |
st.sidebar.markdown('Extract tables from PDF')
|