Code Monkey home page Code Monkey logo

telecom---chatbot's Introduction

Telecom---ChatBot

Chatbot: Using Keras with Tensorflow as "Backend-Engine" and python.

System Requirements

Make sure you have the Python 3.7.6 installed IDE : Anaconda(Jupyter and Spyder),Pycharm.

Installation

  • Create a virtual enviornment: This is a good practice but not necessary

    • Goto Anaconda Prompt and type in the below command. This command will create a virtual enviornment. conda create -y --name tensorflow python=3.7
    • Now activate the virtual enviornment, by executing the below command. This command will change the prompt from "base" to "tensorflow" activate tensorflow
  • In the Terminal type the following commands to install the libraries,this will check the exsisiting version and will install the latest one.

    • conda install -y scipy
    • pip install --exists-action i --upgrade tensorflow==2.0.0
    • pip install --exists-action i --upgrade keras
    • pip install --exists-action i --upgrade nltk
    • pip install --exists-action i --upgrade numpy
    • pip install --exists-action i --upgrade pandas
    • pip install --exists-action i --upgrade pickle
    • pip install --exists-action i --upgrade
  • Check the version installed using below commands:

    • tf.version (where tf is the alias of tensorflow)
    • k.version (where k is the alias of keras)
    • sys.version
    • pd.version (where pd is the alias of pandas)
  • Select the virtual Environment:

    • In Anaconda Navigator --> Home, Click on the "Applications on" dropdown and Select "tensorflow".
    • This will take a few minutes, after that install the prefered IDE (Jupyter, Spyder),installation is required for first time only
    • Launch the IDE and start coding.
  • In IDE Pycharm : Pycharm uses a virtual enviornment to run tensorflow, hence install the tensorflow to the specific virtual enviornment.

    • Project Setting --> Project Interpreter --> Click on the "+" icon at the bottom left of the package window --> type in tensorflow and specify the version
    • Click on Install Package

Possible Errors

tensorboard 2.0.0 has requirement setuptools>=41.0.0, but you'll have setuptools 40.8.0 which is incompatible.

This is a possible error which can be solved using the command

pip install --upgrade --user tensorflow

License

Open Source Software

IDE used for the project:

Pycharm, Anaconda Jupyter

Python Libraries :

  • for creating model. from keras.models import Sequential
  • for creating layers for the model. from keras.layers import Dense, Activation, Dropout
  • for selecting optimiser for minising loss and hence increasing accuracy. from keras.optimizers import Adam,SGD
  • for chatbot GUI. from tkinter import *
  • for displaying date and time. import time import datetime
  • for processing natural language. from nltk import word_tokenize
  • wordNet is a collection of nouns and verbs and adjectives and their synonyms from nltk.stem import WordNetLemmatizer
  • for create light weight binary files. import pickle
  • for importing the model created. from keras.models import load_model
  • for formating the Intents.json file. import json
  • for selecting a random "response" from the slected "tag" import random
  • for converting the bag-of-words (bag) from customer input and feeding it to the model. import numpy as np
  • for making database related operations(insert, select) import sqlite3
  • for matching words from customer for unlimited data. from fuzzywuzzy import fuzz
  • for processing the images used in the aplication. from PIL import Image from PIL import ImageTk

##General Instructions

  • To download the corpus i.e nltk_data either :
  1. Run the below command in the terminal window of PyCharm or on the command prompt. python -m nltk.downloader all
  2. In your .py file add 2 line: import nltk nltk.download() A pop-up window will apper and click on download --> it will take some time, Once all the collections turn green close the window.
  • Make sure proper libraries are imported while executing and please follow best coding practices.

Happy Coding!

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.