Skip to content

Vinaypaul-max/CodeAlpha_FAQChatbot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

💪 FitBot — Fitness FAQ Chatbot

CodeAlpha AI Internship | Task 2

An NLP-powered FAQ chatbot focused on fitness and nutrition. Uses TF-IDF vectorization and cosine similarity to match user questions with the most relevant FAQ answer.


✨ Features

  • 🤖 NLP-powered matching — TF-IDF + cosine similarity via scikit-learn
  • 🧹 Text preprocessing — tokenization, stopword removal via NLTK
  • 💬 Chat UI — Streamlit chat interface with message history
  • Quick suggestions — one-click example questions
  • 🏋️ 30+ FAQs — covering protein, workouts, supplements, fat loss, muscle building

🛠️ Tech Stack

Tool Purpose
Streamlit Chat UI
NLTK Tokenization & stopword removal
scikit-learn TF-IDF vectorization & cosine similarity
Python 3.8+ Core language

🚀 Setup & Run

1. Clone the repo

git clone https://github.com/YOUR_USERNAME/CodeAlpha_FAQChatbot.git
cd CodeAlpha_FAQChatbot

2. Install dependencies

pip install -r requirements.txt

3. Run the app

streamlit run app.py

📁 Project Structure

CodeAlpha_FAQChatbot/
├── app.py              # Main Streamlit app + NLP logic
├── faqs.py             # FAQ dataset (70+ Q&A pairs)
├── requirements.txt    # Dependencies
└── README.md           # This file

🧠 How It Works

  1. User types a question
  2. Question is preprocessed (lowercased, punctuation removed, stopwords filtered)
  3. TF-IDF vectorizer converts all FAQ questions + user question into vectors
  4. Cosine similarity finds the closest matching FAQ
  5. If similarity > threshold (0.15), the matched answer is returned
  6. Otherwise, a fallback message is shown

👤 Author

Built as part of the CodeAlpha AI Internship program.

About

AI-powered fitness FAQ chatbot built with Streamlit, NLTK, and scikit-learn. 70+ FAQs covering workouts, nutrition, exercise form, and supplements. CodeAlpha AI Internship - Task 2.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages