import streamlit as st from tablecv import extract_table img_name = st.file_uploader("Upload an image with table(s)") if img_name is not None: st.image(img_name) extracted_tables = extract_table(image_path=img_name) @st.experimental_memo def convert_df(df): return df.to_csv(index=False).encode('utf-8') csv = convert_df(extracted_tables) st.table(extracted_tables) st.download_button( "Press to Download", csv, "file.csv", "text/csv", key='download-csv' )