Nalla commited on
Commit
20c87e5
·
1 Parent(s): ef42a4d

Update App_For_PDF_To_Dataframe.py

Browse files

Changes done to add drop downlist for tables

Files changed (1) hide show
  1. App_For_PDF_To_Dataframe.py +3 -2
App_For_PDF_To_Dataframe.py CHANGED
@@ -46,9 +46,10 @@ if input_pdf is not None:
46
  base64_pdf = base64.b64encode(input_pdf.read()).decode('utf-8')
47
  f.write(base64.b64decode(base64_pdf))
48
  f.close()
49
-
 
50
  # read the pdf and parse it using stream
51
- table = cam.read_pdf("input.pdf", pages = page_number, flavor = 'stream')
52
 
53
  st.markdown("### Number of Tables")
54
 
 
46
  base64_pdf = base64.b64encode(input_pdf.read()).decode('utf-8')
47
  f.write(base64.b64decode(base64_pdf))
48
  f.close()
49
+ #Select the flavor which is needed
50
+ ddl_list_selection = st.selectbox('Is there a table format already present in the pdf uploaded ?',('lattice', 'stream'))
51
  # read the pdf and parse it using stream
52
+ table = cam.read_pdf("input.pdf", pages = page_number, flavor = ddl_list_selection)
53
 
54
  st.markdown("### Number of Tables")
55