Skip to content

Mohammedh564/FAQ-chatnot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

FAQ Chatbot

This is a simple FAQ chatbot built using Python, SpaCy, and Streamlit. The chatbot helps users find answers to frequently asked questions (FAQs) by using natural language processing (NLP) to compare the user's question with predefined FAQs and return the most relevant answer.

Features

  • Uses SpaCy for natural language processing (NLP) to detect similarity between user input and predefined FAQ questions.
  • Simple and interactive interface created with Streamlit for real-time question and answer interaction.
  • Supports handling common FAQs related to business operations like return policies, order tracking, shipping, and payment methods.

Requirements

Before you start, ensure you have the following installed:

Installation

  1. Clone the repository:
git clone https://github.com/yourusername/faq-chatbot.git
cd faq-chatbot
  1. Create a virtual environment (optional but recommended):
python -m venv venv
source venv/bin/activate  # On Windows use `venv\Scripts\activate`
  1. Install the required packages:
pip install -r requirements.txt
  1. Download the SpaCy English model:
python -m spacy download en_core_web_sm

How to Run

To run the FAQ chatbot locally:

streamlit run app.py

Once Streamlit runs the app, it will open in your browser. Type your question in the provided text area, and click "ASK" to see the chatbot’s response.

Project Structure

📂 faq-chatbot
 ├── 📄 app.py                # Main script to run the FAQ chatbot
 ├── 📄 README.md             # Project documentation
 ├── 📄 requirements.txt      # Python package dependencies

app.py

The main application script that:

  • Loads the SpaCy language model
  • Defines a dictionary of FAQs
  • Compares the user's input with the predefined FAQs using similarity scores
  • Returns the best matching FAQ answer

requirements.txt

List of Python libraries required to run the project:

spacy
streamlit

Usage

  1. Run the chatbot with the command:
streamlit run app.py
  1. Type your question into the text area.
  2. Click the ASK button, and the chatbot will respond with the most relevant FAQ answer.

Example FAQs

Here are the questions the chatbot currently understands:

  • What is your return policy?
  • How do I track my order?
  • Do you ship internationally?
  • What payment methods do you accept?

Future Improvements

  • Add more FAQs to cover additional topics.
  • Improve the similarity detection algorithm for better accuracy.
  • Implement multi-lingual support.
  • Add integration with a backend FAQ management system to dynamically update FAQs.

About

FAQ chatbot using spaCy and nlp techniques

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages