This project implements a simple chatbot with a web user interface. The chatbot is designed to answer user questions based on a predefined knowledge base and allows users to teach it new responses.
web-chatbot
├── backend
│ ├── app.py # Python code for the chatbot backend
│ ├── knowledge_base.json # JSON file storing the chatbot's knowledge base
│ └── requirements.txt # Python dependencies required for the backend
├── frontend
│ ├── index.html # Main HTML file for the web user interface
│ ├── styles.css # CSS styles for the web user interface
│ └── app.js # JavaScript code for handling user interactions
└── README.md # Documentation for the project
-
Clone the repository:
git clone <repository-url> cd web-chatbot -
Install backend dependencies: Navigate to the
backenddirectory and install the required Python packages:cd backend pip install -r requirements.txt -
Run the backend: Start the chatbot server by running:
python app.py -
Open the frontend: Open
frontend/index.htmlin your web browser to access the chatbot interface.
- Type your question in the input field and press Enter or click the submit button.
- If the chatbot does not know the answer, you can provide a new response to teach it.
- Type "quit" in the input field to exit the chatbot.
Feel free to contribute to this project by submitting issues or pull requests. Your feedback and suggestions are welcome!