Coder Social home page Coder Social logo

chatbotai's Introduction

chatbotAI

a bot i made right now it has very litle training materials. it reads what you write and from what it has learned answers back. it has only been trained if five types of resposes found in the form of a json file , look at the code the more types of anwers or in otherwords types of training materials in form of jaon file it has the smarter it gets

Requirements

  • docker
  • docker-compose

where to get the data

git clone https://github.com/valiantlynx/chatbotAI.git
cd chatbotAI

Installation

I am using big libraries like tensorflow and keras so it is better to use docker to run this project. i have included a docker-compose file to make it easier to run the project run:

docker-compose up --build -d 

to run the project in the background.

! you have to wait till the training is done. it will go through 400 epochs. you can check the progress by:

docker-compose logs

once you see logs like this:

chatbotai-fastapi-1  | Epoch 400/400
 1/87 [..............................] - ETA: 0s - loss: 0.0723 - accuracy: 1.0013/87 [===>..........................] - ETA: 0s - loss: 0.4671 - accuracy: 0.8430/87 [=========>....................] - ETA: 0s - loss: 0.6276 - accuracy: 0.8146/87 [==============>...............] - ETA: 0s - loss: 0.6012 - accuracy: 0.8261/87 [====================>.........] - ETA: 0s - loss: 0.6107 - accuracy: 0.8374/87 [========================>.....] - ETA: 0s - loss: 0.5939 - accuracy: 0.8387/87 [==============================] - 0s 4ms/step - loss: 0.6126 - accuracy: 0.8329
chatbotai-fastapi-1  | /usr/local/lib/python3.11/site-packages/keras/src/engine/training.py:3079: UserWarning: You are saving your model as an HDF5 file via `model.save()`. This file format is considered legacy. We recommend using instead the native Keras format, e.g. `model.save('my_model.keras')`.
chatbotai-fastapi-1  |   saving_api.save_model(
chatbotai-fastapi-1  | INFO:     Started server process [8]
chatbotai-fastapi-1  | INFO:     Waiting for application startup.
chatbotai-fastapi-1  | INFO:     Application startup complete.

its done.

go to http://localhost:8000/ to see the project running as well as the explanation of how it works

to stop the project run:

docker-compose down

docker-compose down will stop the project and remove the container. you might want to remove the images as well to save space on your computer. to do that run:

docker rmi chatbotai-fastapi 

after running docker-compose down

alternative installation

i have not tested it as i made quick. if you dont have docker compose, run the file setup.sh. with:

bash setup.sh

though if you have docker i recommend using docker-compose as it is easier to run the project with it

chatbotai's People

Contributors

valiantlynx avatar

Stargazers

Tegegn Dagmawi Delelegn avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.