Skip to content

Sagar3195/Invoice_Extractor_App

Repository files navigation

End To End Multi Language Invoice Extractor Project Using Google Gemini and Streamlit

🧾 Invoice Extractor with Google Gemini

A Streamlit-based application that extracts key information from invoices using Google Gemini LLM model. This tool allows users to upload invoice files (PDF/JPG/PNG), and the Gemini model automatically extracts structured data such as invoice number, date, vendor, line items, totals, and more.

🔍 Overview

This project demonstrates how to build an AI-powered Invoice Extraction System using the Google Gemini Pro API. It uses:

  • Gemini Model (via Google GenAI) for document analysis

  • Streamlit for the user interface

  • Python backend to process invoice files

  • Users upload an invoice and receive structured extracted data instantly.

🚀 Getting Started

Follow the steps below to set up and run the project locally.

📦 Prerequisites

Before starting, ensure you have:

  • Python 3.10+

  • Google Gemini API Key

🔑 How to Obtain a Gemini API Key

  1. Visit: https://aistudio.google.com/

  2. Log in with your Google account

  3. Navigate to API Keys

  4. Create a new API key

  5. Copy the key and store it securely

  6. You will use this key in a .env file or environment variable.

⚙️ Setup & Installation

1️⃣ Clone the Repository

git clone <repository_url>
cd <repository_name> 

2️⃣ Create and Activate Virtual Environment

Using uv (recommended):

pip install uv
uv venv

### Activate:

### Mac/Linux:
source .venv/bin/activate

### Windows
.venv\Scripts\activate

3️⃣ Install Dependencies

uv add -r requirements.txt

4️⃣ Add Your Google API Key

Create a .env file in the root folder:

GOOGLE_API_KEY="YOUR_GOOGLE_API_KEY"

▶️ How to Run the App

streamlit run app.py

Streamlit will automatically open your browser.

🧾 How It Works

  1. Upload an invoice file (PDF, PNG, JPG)

  2. The app sends the document to Gemini Pro Vision

  3. The model extracts:

  • Invoice number

  • Invoice date

  • Vendor / company name

  • Line items (qty, price, description)

  • Tax & totals

  1. Extracted data is displayed in a structured format

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages