Skip to content

About

AI-powered system to predict freight costs and flag suspicious vendor invoices.

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

🧾 Vendor Invoice Intelligence System

An AI-powered portal that automates vendor invoice processing using Machine Learning — predicting freight costs and flagging suspicious invoices in real time.

Python Streamlit Scikit-learn Status


🖼️ App Preview

🚚 Freight Cost Predictor

Freight Cost Predictor

🚩 Invoice Flag Detector

Invoice Flag Detector


📌 Project Objectives

# Objective
01 Predict accurate freight costs using shipment quantity and dollar values to eliminate manual estimation errors
02 Automatically detect and flag suspicious vendor invoices using a Random Forest classifier trained on historical billing patterns
03 Reduce invoice processing time and financial risk by providing real-time AI-driven insights to procurement and finance teams

🚀 Features

  • 🚚 Freight Cost Predictor

    • Input: Dollars
    • Output: Estimated freight cost in dollars
    • Best model auto-selected from Linear Regression, Decision Tree, and Random Forest
  • 🚩 Invoice Flag Detector

    • Input: 7 invoice features
    • Output: CLEAR ✅ or FLAGGED 🚩
    • Model: Random Forest Classifier

🤖 Models

Freight Cost Predictor

Detail Info
Algorithms Trained Linear Regression, Decision Tree, Random Forest
Selection Criteria Lowest MAE (Mean Absolute Error)
Input Features Quantity, Dollars
Output Predicted Freight Cost ($)
Saved Model models/predict_fright_model.pkl

Invoice Flag Detector

Detail Info
Algorithm Random Forest Classifier
Input Features invoice_quantity, invoice_dollars, Freight, total_item_quantity, total_item_dollars, total_brands, days_PO_to_invoice
Output 0 = Clear, 1 = Flagged
Saved Model models/predict_flag_invoice.pkl

🛠️ Tech Stack

Technology Purpose
Python 3.8+ Core programming language
Streamlit Web app framework
Scikit-learn Machine learning models
Pandas Data manipulation
NumPy Numerical computation
Joblib Model serialization

📁 Project Structure

Vendor-Invoice-Intelligence-System/
│
├── app.py                          # Main Streamlit application
│
├── models/
│   ├── predict_fright_model.pkl    # Trained freight cost model
│   ├── predict_flag_invoice.pkl    # Trained invoice flag model
│   └── scaler.pkl                  # Feature scaler for invoice model
│
├── inference/
│   ├── predict_freight.py          # Freight cost inference module
│   └── predict_invoice_flag.py     # Invoice flag inference module
│
├── freight_cost_prediction/
│   ├── data_preprocessing.py       # Data loading and feature prep
│   ├── model_evaluation.py         # Model training and evaluation
│   └── train.py                    # Training pipeline
│
├── invoice_flagging/
│   ├── data_preprocessing.py       # Invoice data loading and labeling
│   ├── model_evaluation.py         # Classifier training and evaluation
│   └── train.py                    # Training pipeline
│
├── data/
│   └── inventory.db                # Source database
│
├── Freight_Cost_predictor.png      # App screenshot
├── Invoice_Flag_predictor.png      # App screenshot
└── README.md                       # Project documentation

▶️ How to Run

1. Clone the repository

git clone https://github.com/imakash45/Vendor-Invoice-Intelligence-System.git
cd Vendor-Invoice-Intelligence-System

2. Install dependencies

pip install streamlit scikit-learn pandas numpy joblib

3. Run the app

python -m streamlit run app.py

4. Open in browser

http://localhost:8501

📊 How to Use

🚚 Freight Cost Predictor

  1. Select Freight Cost Predictor from the sidebar
  2. Enter Dollars ($) — total invoice dollar value
  3. Click ⚡ Predict Freight Cost
  4. View the estimated freight cost instantly

🚩 Invoice Flag Detector

  1. Select Invoice Flag Detector from the sidebar
  2. Enter all 7 invoice features:
    • Invoice Quantity
    • Invoice Dollars
    • Freight
    • Total Item Quantity
    • Total Item Dollars
    • Total Brands
    • Days PO to Invoice
  3. Click 🔍 Analyze & Flag Invoice
  4. View result — CLEAR ✅ or FLAGGED 🚩

🧠 Model Training

Retrain Freight Cost Model

python freight_cost_prediction/train.py

Retrain Invoice Flag Model

python invoice_flagging/train.py

👨‍💻 Author

Akash Kumar


⭐ Support

If you found this project helpful, please give it a ⭐ on GitHub!

About

AI-powered system to predict freight costs and flag suspicious vendor invoices.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages