Skip to content

Utilizing Redis Vector Similarity Search, this demo project streamlines expense categorization from bank transactions. The approach harnesses pre-trained models, sidestepping the need for finetuning. This ensures efficient, accurate expense categorization without complex model adjustments

License

Notifications You must be signed in to change notification settings

mar1boroman/ExpenseFlow

Repository files navigation

Redis Vector Search to Categorize Financial Transactions

About this demo application

With this demo application, we use a pre-labelled set of transactions train.csv to predict the categories of a seperate transaction log test.csv. This usecase is specially useful if your fintech application needs to build a expense tracker or categorizer. This approach also avoids the task of finetuning the AI models and allows you to use off the shelf pre-trained model. This demo uses the Open AI text embedding model, you need a functioning Open AI API key to test this application

In this particular demo application, we use the library redisvl which is a python library helping you to use the redis vector database functionality in a hassle free manner.

Project Setup

Spin up a Redis instance enabled with RedisStack!

The easiest way to is to use a docker image using the below command

docker run -d -p 6379:6379 -p 8001:8001 redis/redis-stack:latest

If you do not want to use a docker image, you can sign up for a free Redis Cloud subscription here.

Set up the project

Download the repository

git clone https://github.com/mar1boroman/ExpenseFlow.git && cd ExpenseFlow

Prepare and activate the virtual environment

python3 -m venv venv && source venv/bin/activate

Install necessary libraries and dependencies

pip install -r requirements.txt

Configure your OPEN AI Key in the .env file

vi .env

Using the project

streamlit run ui/0_📎_Upload_Pre_Labelled_Data.py

In the first screen upload the train.csv file to load the embeddings of pre-labelled data

In the 🔮_Predict_Categories screen load the test.csv file to predict the category of every transaction and show an aggregated view of the expense

If you want to check a sample step by step exection (behind the scenes view), the third screen allows you to enter a single transaction description manually and see how the category of the transaction is predicted.

About

Utilizing Redis Vector Similarity Search, this demo project streamlines expense categorization from bank transactions. The approach harnesses pre-trained models, sidestepping the need for finetuning. This ensures efficient, accurate expense categorization without complex model adjustments

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages