Spaces:
Sleeping
Sleeping
Download app.py from vmalapaka/Extract_Invoice: direct link, hf CLI and curl.
- Browser
- Download file 794 Bytes
-
https://huggingface.co/spaces/vmalapaka/Extract_Invoice/resolve/main/app.py
- Command line
-
hf download hf://spaces/vmalapaka/Extract_Invoice/app.py
-
curl -L -o app.py https://huggingface.co/spaces/vmalapaka/Extract_Invoice/resolve/main/app.py
794 Bytes
| import streamlit as st | |
| from utils import * | |
| def main(): | |
| st.set_page_config(page_title="Invoice Extraction Bot") | |
| st.title("Invoice Extraction Bot ") | |
| # Upload the Invoices (pdf files) | |
| pdf = st.file_uploader("Upload invoices here, only PDF format", type=["pdf"],accept_multiple_files=True) | |
| submit=st.button("Extract Data") | |
| if submit: | |
| with st.spinner('Loader'): | |
| df=create_docs(pdf) | |
| st.write(df.head()) | |
| 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", | |
| ) | |
| if __name__ == '__main__': | |
| main() | |