Skip to content

Latest commit

Β 

History

7 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🏦 Bank Chatbot Project

A simple banking chatbot web application built using Flask and PostgreSQL. This project allows users to log in and interact with a chatbot for basic banking queries.

πŸš€ How to Run This Project (Step-by-Step Guide)

πŸ“Œ Follow these steps carefully β€” even if you are a beginner with no coding experience.

🧰 1️⃣ Install Required Software

Before running the project, install:

🐍 Python (3.x)

πŸ—„οΈ PostgreSQL

🌐 Git (optional but recommended)

πŸ“₯ 2️⃣ Download the Project πŸ”ΉOption 1: Download ZIP (Easy)

Click Code β†’ Download ZIP

Extract the ZIP file

πŸ”ΉOption 2: Using Git (Recommended) git clone https://github.com/yourusername/bank-chatbot.git πŸ“‚ 3️⃣ Navigate to Project Folder

After extraction, you may see:

Bank-ChatBot-main/ └── Bank-ChatBot-main/

πŸ‘‰ This is normal!

βœ… Go inside the inner folder: cd Bank-ChatBot-main cd Bank-ChatBot-main ⚠️ Common Problem Faced

❌ Error:

can't open file 'app.py'

βœ”οΈ Solution: πŸ‘‰ You were in the wrong folder πŸ‘‰ Move inside the correct folder where app.py exists

πŸ“ 4️⃣ Folder Structure (VERY IMPORTANT)

Make sure your project looks like this:

bank-chatbot/ β”œβ”€β”€ app.py β”œβ”€β”€ templates/ β”‚ β”œβ”€β”€ login.html β”‚ β”œβ”€β”€ chatbot.html β”‚ β”œβ”€β”€ admin.html β”‚ β”œβ”€β”€ dashboard.html

❗ If templates folder is missing β†’ app will NOT run

  πŸ“¦ 5️⃣ Install Python Libraries

Open Command Prompt in project folder and run:

  pip install flask psycopg2-binary

πŸ—„οΈ 6️⃣ Setup PostgreSQL Database

Open pgAdmin and run the following:

βœ… Create Database CREATE DATABASE bankdb; βœ… Create Table CREATE TABLE users( id SERIAL PRIMARY KEY, username TEXT, password TEXT ); βœ… Insert Test User INSERT INTO users(username,password) VALUES('admin','admin'); ⚠️ Important Note

In app.py, check this:

password="postgres"

πŸ‘‰ If your PostgreSQL password is different, change it accordingly.

▢️ 7️⃣ Run the Application

In terminal:

python app.py

You will see:

Running on http://127.0.0.1:5000 🌐 8️⃣ Open in Browser

Go to:

http://127.0.0.1:5000 πŸ” Login Credentials Username: admin Password: admin πŸ’¬ 9️⃣ How to Use

After login:

Click πŸ’¬ chatbot button

Try typing:

hello

balance

loan

credit card

⚠️ Common Errors & Solutions ❌ Template Not Found

βœ”οΈ Make sure HTML files are inside templates folder

  ❌ Database Connection Error

βœ”οΈ Check:

PostgreSQL is running

Database name = bankdb

Password is correct

❌ psycopg2 Error

βœ”οΈ Run:

     pip install psycopg2-binary

🧠 Project Notes

This chatbot is rule-based (not AI)

Uses Flask for backend

Uses PostgreSQL for database

Frontend built using HTML + CSS

πŸš€ Future Improvements

  πŸ€– Add AI chatbot (OpenAI API)

  πŸ—„οΈ Replace PostgreSQL with SQLite (easier setup)

  🎨 Improve UI design

  🌍 Deploy online

About

Banking chatbot built with Flask and PostgreSQL

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages