File size: 1,123 Bytes
c76a309
0883d0c
439af7e
c76a309
 
 
 
0883d0c
439af7e
 
 
 
c76a309
 
 
439af7e
c76a309
 
 
 
 
 
1f75688
c76a309
1f75688
c76a309
1f75688
 
 
 
 
 
 
c76a309
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
import streamlit as st
from dotenv import load_dotenv
from utils import *



def main():
    load_dotenv()

    st.set_page_config(page_title="Invoice Extraction Bot")
    st.title("Audio_to_text & Invoice Extraction Bot...💁 ")
    st.subheader("I can help you in extracting text and invoice data and Aduio2text")


    # Upload the Invoices (pdf files)...
    pdf = st.file_uploader("Upload invoices here for now, only PDF files allowed and will accept other formate as well", type=["pdf"],accept_multiple_files=True)

    submit=st.button("Extract Data")

    if submit:
        with st.spinner('Wait for it...'):
            df=create_docs(pdf)
            st.write(df)

            # data_as_csv= df.to_csv(index=False).encode("utf-8")
            
            # st.download_button(
            #     "Download data as CSV", 
            #     data_as_csv, 
            #     "benchmark-tools.csv",
            #     "text/csv",
            #     key="download-tools-csv",
            # )
        st.success("Hope I was able to save your time❤️")



#Invoking main function
if __name__ == '__main__':
    main()