CoolFace
Apppublic

Gowthamsai/Financial-risk-engine

sourceHugging Faceupdated 5mo agoView on Hugging Face
0likes
App README

Financial Risk Engine using ML and RAG

An AI-powered financial monitoring platform designed to parse bank statement PDFs, categorize transactions using ML, detect recurring payments, and provide personalized risk assessments with a real-time RAG (Retrieval-Augmented Generation) chatbot.

<img width="1918" height="906" alt="image" src="https://github.com/user-attachments/assets/51fb8e25-6f0a-4a03-a94d-590d48612db7" />

๐Ÿš€ Key Features

๐Ÿฆ Intelligent PDF Parsing

  • โ€”Transaction Normalization: Automatically handles (Dr) and (Cr) suffixes and normalized date formats.
  • โ€”Batch Processing: Upload multiple years of PDFs to build a deep financial profile.

๐Ÿง  ML-Driven Analytics

  • โ€”Smart Categorization: Uses a Hybrid Keyword + ML (Naive Bayes) model to categorize UPI, ATM, and Merchant transactions.
  • โ€”Recurring Payment Detection: Identifies subscriptions (Netflix, Spotify), Autopays, and regular bills.
  • โ€”Debt Trap Analysis: Flags high EMI-to-income ratios and multiple BNPL payments.
  • โ€”FY Prediction: Forecasts next fiscal year spending trends based on historic data.

๐Ÿ’ฌ Risk Assistant (RAG Chatbot)

  • โ€”Data-Grounded AI: A Chatbot powered by Google Gemini that answers questions specifically about your transactions and risk profile.
  • โ€”Privacy First: Data is retrieved dynamically from your secure Supabase storage and injected into the LLM context only for your session.

๐Ÿ“ง Automated Risk Reports

  • โ€”Instant Insights: Recieve a sleek HTML report via email immediately after PDF analysis is complete.
  • โ€”Performance: Summarizes top spending categories and top-level risk metrics.

๐Ÿ› ๏ธ Security & Tech Stack

  • โ€”Frontend: React, Vite, Tailwind CSS, Shadcn UI, Recharts, Framer Motion.
  • โ€”Backend: Flask (Python 3.10+), Pandas, Scikit-learn, PDFPlumber.
  • โ€”Database: Supabase (PostgreSQL with RLS), Auth, and Storage.
  • โ€”Security: MFA Authentication, 2-minute inactivity auto-logout, JWT session protection.

โš™๏ธ Installation & Setup

  1. 1.Clone the repository
bash
   git clone https://github.com/your-username/risk-dashboard-ui.git
   cd risk-dashboard-ui
  1. 1.Frontend Setup
bash
   npm install
  1. 1.Backend Setup
bash
   cd backend
   python -m venv venv
   source venv/bin/activate  # Or venv\Scripts\activate on Windows
   pip install -r requirements.txt
  1. 1.Environment Variables Create a .env file in the root directory (use .env.example as a template):
env
   VITE_SUPABASE_URL=your_supabase_url
   VITE_SUPABASE_ANON_KEY=your_anon_key
   GEMINI_API_KEY=your_google_ai_key
   SMTP_USER=your_email@gmail.com
   SMTP_PASS=your_app_password
  1. 1.Run the Application
  2. 2.Frontend: npm run dev
  3. 3.Backend: cd backend && python app.py

๐Ÿ›ก๏ธ License

Distributed under the MIT License. See LICENSE for more information.


Built for advanced financial risk monitoring.

aide-project

aide-project

aide-project