Skip to content

mohtasham9/invoice_check_parsing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Invoice & Check Parser

Overview

This application processes invoices and checks using OpenAI's GPT-4o for image recognition and Snowflake for data storage. It extracts relevant details from uploaded documents and stores structured data in a Snowflake database.

Features

  • Parses invoices and checks from PDF and image files.
  • Uses OpenAI's GPT-4o for extracting structured data.
  • Stores extracted data in a Snowflake database.
  • Built with Streamlit for an interactive web interface.
  • Supports invoice itemization and structured check data extraction.

Technologies Used

  • Python
  • Streamlit
  • OpenAI GPT-4o (via LangChain)
  • Snowflake
  • Fitz (PyMuPDF) for PDF processing
  • Pandas for data manipulation

Installation

  1. Clone the repository
  2. Install dependencies:
    pip install -r requirements.txt
  3. Set up environment variables in keys.py:
    OPENAI_API_KEY = "your_openai_api_key"
    SNOWFLAKE_USER = "your_snowflake_user"
    SNOWFLAKE_PASSWORD = "your_snowflake_password"
    SNOWFLAKE_ACCOUNT = "your_snowflake_account"
    SNOWFLAKE_ROLE = "your_snowflake_role"
    SNOWFLAKE_WAREHOUSE = "your_snowflake_warehouse"
    SNOWFLAKE_DATABASE = "your_snowflake_database"
  4. Run the application:
    streamlit run main.py

Usage

  1. Select "Invoice" or "Check" in the Streamlit UI.
  2. Upload the relevant document (PDF for invoices, image for checks).
  3. The application extracts structured data and displays it.
  4. Invoice data is stored in Snowflake for further processing.

Data Extraction Details

Invoice Extraction:

  • Vendor Name
  • Invoice Number
  • Customer Number
  • Invoice Date
  • PO Number & Date
  • Items (Quantity, Price, Description, etc.)
  • Total Invoice Amount

Check Extraction:

  • Check Number
  • Payee Name
  • Amount (Numeric & Words)
  • Check Date
  • Bank Details
  • Memo & Payer Information

Snowflake Integration

  • Deletes existing records for an uploaded invoice before inserting new data.
  • Stores structured invoice data, including itemized details.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published