GitXplorerGitXplorer
H

Chatbot

public
1 stars
0 forks
0 issues

Commits

List of commits on branch main.
Unverified
01d7e94373758faffaa78fce26e49876f9f8975b

Changes

HHk669 committed a year ago
Unverified
a2c1800d97e55f88e44171b87463aa28c8d9a737

license

HHk669 committed 2 years ago
Unverified
df95273cfecb340c167bf9e4883928774f8f99f8

.

HHk669 committed 2 years ago
Unverified
09d8c22d4e33d5d7eb1ad9810577c1ac879d9865

comments added

HHk669 committed 2 years ago
Unverified
b2109cd5fdbc661a056c5b5aed28574fe5ab1eec

working api

HHk669 committed 2 years ago
Unverified
1399c781fec0853d6f007700f13ea8fc9fd5f68b

fast api

HHk669 committed 2 years ago

README

The README file for this repository.

Chatbot Description

This chatbot is a machine learning-based conversational agent trained to understand and respond to user input. It utilizes a neural network model built with Keras, a deep learning library, to provide intelligent responses in natural language.

The chatbot's functionality is based on a bag-of-words approach, where input text is processed and transformed into a binary representation of word occurrence. The training data consists of a collection of documents, with each document containing a list of words or tokens.

During the training process, the chatbot preprocesses the documents by applying lemmatization and lowercasing to the words. It then constructs a bag-of-words representation for each document by encoding the presence or absence of words from a predefined vocabulary.

The training data is split into input (bag-of-words) and output representations. The input is fed into a sequential neural network model, which consists of multiple dense layers with dropout regularization. The model is compiled with a categorical cross-entropy loss function and optimized using the stochastic gradient descent (SGD) algorithm.

The trained model can be used to generate responses by inputting new text data. The chatbot selects the most likely class or category for the input based on the model's output probabilities. It then formulates a response based on predefined mappings or patterns associated with the predicted class.

The chatbot's performance can be improved by training it on a diverse and representative dataset, fine-tuning the model architecture, and optimizing the hyperparameters.

Usage

To use the chatbot, you need to provide a set of training documents in the appropriate format. Each document should consist of a list of words or tokens along with the corresponding class or category.

Once the training data is prepared, run the training script to train the model on the data. After training, the model can be saved for future use.

To interact with the chatbot, provide user input as text data. The chatbot will process the input, generate a response based on the trained model, and display it to the user.

Sample of the bot

image

The input is given to the bot and it understands the sentence and returns the relevant answer which is trained to the model

image