Skip to content

AI web application, using custom data-set to train and build a LLM from scratch to provide assistance for fraud detection and protfolio management

License

Notifications You must be signed in to change notification settings

Jayesh-Dev21/FinanceWise

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

19 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

FinanceWise 🏦

It provides :

  • Fraud Detection Services (Sentinel)
  • Financial Guidance (Moneto)
  • Portfolio Management (Future Project ---> Vigilant)

FinanceWise 🏦

Next-Generation Financial Intelligence Platform
🌐 Live Demo: https://financewise-ldv2.onrender.com/
πŸ“„ Presentation: View Slides

Flask PyTorch Transformers

Main Page

Overview πŸ’‘

FinanceWise is an AI-powered financial platform combining two robust systems:

  1. Sentinel πŸ›‘οΈ - Advanced Fraud Detection System
  2. Moneto πŸ’¬ - Intelligent Financial Advisor

Key Features ✨

Sentinel Fraud Detection System

{
  "Real-time transaction analysis",
  "Deep learning model with 99.9% accuracy",
  "Suspicious pattern recognition",
  "AI-generated risk explanations"
}

Issues

  • Trained on Dataset with a 1.29% Fraud Rate, thus resulting in some anomalies which will be rectified in a few updates.

Sentinel

Moneto Financial Advisor

{
  "Llama-3 70B-powered financial guidance",
  "Real-time market insights",
  "Personalized wealth management",
  "Risk assessment strategies",
}

Moneto

Vigilant Portfolio Manager (Future plans)

{

  "*** COMING SOON ***"

}

Tech Stack πŸ› οΈ

Backend
Flask

Frontend
HTML5 CSS3 JavaScript

APIs & Services
Groq Cloud Service Llama3

Personal Model
SENTINAL : Self-Created and Self Trained

Prerequisites

  • Python 3.9+
  • pip package manager
  • Git version control

Step-by-Step Setup

  1. Clone repository:
    git clone https://github.com/Jayesh-Dev21/FinanceWise.git
    cd FinanceWise
  2. Create virtual environment:
    python -m venv venv
    # Linux/MacOS
    source venv/bin/activate
    # Windows
    venv\Scripts\activate
  3. Install dependencies:
    pip install -r requirements.txt
  4. Configure environment variables: Create a .env file in the root directory:
    GROQ_API_KEY="your_groq_api_key_here"
    FLASK_DEBUG=0
    PORT=1200
  5. Download ML models:
    # Place scaler.pkl and fraud_detection_model.pth in root directory

Usage Guide πŸ“–

Running the Application

python app.py

Accessing the Web Interface

Open your browser and navigate to:

API Documentation πŸ”Œ

Endpoints

Endpoint Method Description Parameters
/predict POST Fraud detection analysis JSON transaction data
/chat POST Financial advice generation { message: string }

Sample Inputs

Fraud Detection (POST /predict):

{
  "amount": 1500,
  "credit_limit": 5000,
  "use_chip": "Chip Transaction",
  "merchant_category": "Online Retail",
  "transaction_date": "2024-03-15"
}

Financial Advice (POST /chat):

{
  "message": "Should I invest 20% of my salary in cryptocurrency?"
}

Response Formats

Successful Fraud Detection Response:

{
  "probability": 0.92,
  "prediction": "Fraud",
  "explanation": "Risk assessment: 92.3% suspicious activity likelihood"
}

Financial Advice Response:

{
  "response": "While cryptocurrency can offer high returns, I recommend..."
}

Project Structure πŸ“‚

FinanceWise/
β”œβ”€β”€ public/                    # Frontend assets
β”‚   β”œβ”€β”€ static/                # Static resources
β”‚   β”‚   β”œβ”€β”€ css/               # Stylesheets
β”‚   β”‚   β”œβ”€β”€ js/                # Client-side scripts
β”‚   β”‚   └── images/            # Visual assets
β”‚   └── *.html                 # Application views
β”œβ”€β”€ app.py                     # Flask application
β”œβ”€β”€ requirements.txt           # Dependency list
β”œβ”€β”€ scaler.pkl                 # Feature scaler
β”œβ”€β”€ fraud_detection_model.pth  # Trained model
└── .env                       # Environment configuration

Contributors πŸ‘₯

  • Harsh Gupta – Sentinel AI Model Training & Optimization
  • Jayesh Puri – Moneto API Integration & LLM Configuration in Sentinel
  • Jaydeep Pokahriya – Full Web Stack Development (Flask Backend + Frontend) and GitHub Handling
  • Krrish – Project Presentation

Acknowledgments πŸ™

  • Groq: For ultra-low latency LLM inference
  • Hugging Face: For transformer models (pre-trained models)
  • Render: For reliable cloud hosting
  • PyTorch Community: For deep learning framework

⚠️ Important Notes:

  • Obtain a Groq API key from Groq Cloud.
  • Do not commit the .env file to version control.
  • For production deployment, set FLASK_DEBUG=0.

About

AI web application, using custom data-set to train and build a LLM from scratch to provide assistance for fraud detection and protfolio management

Topics

Resources

License

Stars

Watchers

Forks