Python Chat Bot Tutorial – Chatbot with Deep Learning (Part 3)




[ad_1]

This python chat bot tutorial will show you how to create a model that can classify our bag of words into a specific class. In the next part we will use the model to make predictions and generate responses.

Text-Based Tutorial: https://techwithtim.net/tutorials/ai-chatbot/part-3/

Playlist: https://www.youtube.com/watch?v=wypVcNIH6D4&list=PLzMcBGfZo4-ndH9FoC4YWHGXG5RZekt-Q

◾◾◾◾◾
💻 Enroll in The Fundamentals of Programming w/ Python
https://tech-with-tim.teachable.com/p

📸 Instagram: https://www.instagram.com/tech_with_tim
🌎 Website https://techwithtim.net
📱 Twitter: https://twitter.com/TechWithTimm
⭐ Discord: https://discord.gg/pr2k55t
📝 LinkedIn: https://www.linkedin.com/in/tim-rusci
📂 GitHub: https://github.com/techwithtim
🔊 Podcast: https://anchor.fm/tech-with-tim

💵 One-Time Donations: https://www.paypal.com/donate/?token=
💰 Patreon: https://www.patreon.com/techwithtim
◾◾◾◾◾◾

⚡ Please leave a LIKE and SUBSCRIBE for more content! ⚡

Tags:
– Tech With Tim
– Python Chatbot tutorial
– Python Chat bot
– Chatbt in python
– Python deep learning chatbot
– Python Tutorials

Source


[ad_2]

Comment List

  • Tech With Tim
    December 7, 2020

    Hello, for line 42:
    wrds = [stemmer.stem(w.lower()) for w in doc]
    i am getting error:
    AttributeError: 'int' object has no attribute 'lower'
    Anyone have a idea?

  • Tech With Tim
    December 7, 2020

    *Accuracy Fix!!!*
    After experimenting with the program for quite some time, I finally figured out a way to fix the accuracy issue.
    I was getting around 25% acc and this is how you make it 95+%:

    In your code around line 20 – 30, there is a line that reads:
    docs_x.append(pattern)
    Change it to:
    docs_x.append(wrds)

    This fixed the program accuracy issue for me!

  • Tech With Tim
    December 7, 2020

    Hey guys I was getting the accuracy 0.21 problem, and I fixed it! For me, net=tflearn.fully_connected(net, 8), I'd accidentally read 0 instead of 8. After changing that I've gotten 99% accuracy

  • Tech With Tim
    December 7, 2020

    what kind of regression is used here…..linear or logical? Please revert.

  • Tech With Tim
    December 7, 2020

    hey…
    for this line output_row[labels.index(docs_y[x])]=1 iam getting error :- ValueError: 'greeting' is not in list

    can someone pls help?

  • Tech With Tim
    December 7, 2020

    Please share the source code link.

  • Tech With Tim
    December 7, 2020

    Can you send full souce code and json file to rakeshrohan540@gmail.com

  • Tech With Tim
    December 7, 2020

    In my work it comes inconsistent use of tabs and spaces in indentation

  • Tech With Tim
    December 7, 2020

    hi, i am getting a very low accuracy, around 20%. can someone help me

  • Tech With Tim
    December 7, 2020

    i get a syntax error on net = tflearn.regression(net) any help? btw im using tensorflow 1.14 tflearn1.19 and python 3.7

  • Tech With Tim
    December 7, 2020

    ModuleNotFoundError: No module named 'tensorflow.contrib'
    To solve this issue we need to have tensorflow <= 1.4, but when I change version i got another issues with numpy and tflearn.
    Is any sove other than don t use tflearn to build layers ?

  • Tech With Tim
    December 7, 2020

    Thanks for the theory, but where is the chat-bot character?

  • Tech With Tim
    December 7, 2020

    Removing the batch_size argument improved my accuracy

  • Tech With Tim
    December 7, 2020

    Hi Tim, why it has to be 8 neurons and 2 hidden layers and 45 ?

  • Tech With Tim
    December 7, 2020

    My code is correct bur not running, throwing this error:

    Traceback (most recent call last):
    File "C:UsersxAppDataLocalProgramsPythonPython38-32libsite-packagestensorflowpythonpywrap_tensorflow.py", line 18, in swig_import_helper
    fp, pathname, description = imp.find_module('_pywrap_tensorflow', [dirname(__file__)])
    File "C:UsersxAppDataLocalProgramsPythonPython38-32libimp.py", line 296, in find_module
    raise ImportError(_ERR_MSG.format(name), name=name)
    ImportError: No module named '_pywrap_tensorflow'
    During handling of the above exception, another exception occurred:
    Traceback (most recent call last):
    File "C:UsersxAppDataLocalProgramsPythonPython38-32libsite-packagestensorflowpython__init__.py", line 66, in <module>
    from tensorflow.python import pywrap_tensorflow
    File "C:UsersxAppDataLocalProgramsPythonPython38-32libsite-packagestensorflowpythonpywrap_tensorflow.py", line 28, in <module>
    _pywrap_tensorflow = swig_import_helper()
    File "C:UsersxAppDataLocalProgramsPythonPython38-32libsite-packagestensorflowpythonpywrap_tensorflow.py", line 20, in swig_import_helper
    import _pywrap_tensorflow
    ModuleNotFoundError: No module named '_pywrap_tensorflow'
    During handling of the above exception, another exception occurred:
    Traceback (most recent call last):
    File "main.py", line 6, in <module>
    import tflearn
    File "C:UsersxAppDataLocalProgramsPythonPython38-32libsite-packagestflearn__init__.py", line 4, in <module>
    from . import config
    File "C:UsersxAppDataLocalProgramsPythonPython38-32libsite-packagestflearnconfig.py", line 3, in <module>
    import tensorflow as tf
    File "C:UsersxAppDataLocalProgramsPythonPython38-32libsite-packagestensorflow__init__.py", line 24, in <module>
    from tensorflow.python import *
    File "C:UsersxAppDataLocalProgramsPythonPython38-32libsite-packagestensorflowpython__init__.py", line 72, in <module>
    raise ImportError(msg)
    ImportError: Traceback (most recent call last):
    File "C:UsersxAppDataLocalProgramsPythonPython38-32libsite-packagestensorflowpythonpywrap_tensorflow.py", line 18, in swig_import_helper
    fp, pathname, description = imp.find_module('_pywrap_tensorflow', [dirname(__file__)])
    File "C:UsersxAppDataLocalProgramsPythonPython38-32libimp.py", line 296, in find_module
    raise ImportError(_ERR_MSG.format(name), name=name)
    ImportError: No module named '_pywrap_tensorflow'
    During handling of the above exception, another exception occurred:
    Traceback (most recent call last):
    File "C:UsersxAppDataLocalProgramsPythonPython38-32libsite-packagestensorflowpython__init__.py", line 66, in <module>
    from tensorflow.python import pywrap_tensorflow
    File "C:UsersVeeraAppDataLocalProgramsPythonPython38-32libsite-packagestensorflowpythonpywrap_tensorflow.py", line 28, in <module>
    _pywrap_tensorflow = swig_import_helper()
    File "C:UsersxAppDataLocalProgramsPythonPython38-32libsite-packagestensorflowpythonpywrap_tensorflow.py", line 20, in swig_import_helper
    import _pywrap_tensorflow
    ModuleNotFoundError: No module named '_pywrap_tensorflow'

    Failed to load the native TensorFlow runtime.
    See https://github.com/tensorflow/tensorflow/blob/master/tensorflow/g3doc/get_started/os_setup.md#import_error
    for some common reasons and solutions. Include the entire stack trace
    above this error message when asking for help.

    And the page it is saying to look at, does not exist

  • Tech With Tim
    December 7, 2020

    Hey Tim
    From what I'm seeing
    Pycharm or tensorflow doesn't recognise “tensorflow.reset_default_graph”

  • Tech With Tim
    December 7, 2020

    woah i got an accuracy of 100%…haha

  • Tech With Tim
    December 7, 2020

    number of epochs =." number of times it sees the data" the best explanation ever

  • Tech With Tim
    December 7, 2020

    line 29, in <listcomp>

    words = [stemmer.stem(w.lower()) for w in words if w not in "?"]

    TypeError: stem() missing 1 required positional argument: 'word'

    What is wrong pls help

  • Tech With Tim
    December 7, 2020

    Thank you Tim! You made it very easy to understand especially not just with theories and definitions but you gave examples or referencing from the training data. Keep it up! 🙂 I'm a newb at ML

  • Tech With Tim
    December 7, 2020

    7:34
    i have a confusion that is softmax creates 6 neurons and each neuron represents a tag, then what if we have more than 6 tags

  • Tech With Tim
    December 7, 2020

    ValueError: ['hello'] is not in list im getting this error can anyone help??

  • Tech With Tim
    December 7, 2020

    Hey can someone tell me how to convert this tflearn code to keras code. Tflearn is not supported

  • Tech With Tim
    December 7, 2020

    Running the script as 11:28 does not work – it just stays, frozen cmd unable to do anything

  • Tech With Tim
    December 7, 2020

    Can I run this whole code in jupyter like does it work the same?

  • Tech With Tim
    December 7, 2020

    Hi, first off, thanks Tim for an amazing tutorial series. I wanna ask, why do we ignore "?" in line 42, when we can just remove "?" from our list of words in line29 with
    words = [stemmer.stem(w.lower()) for w in words if w.isalpha()]?
    Thanks!

  • Tech With Tim
    December 7, 2020

    Need tflearn code to be replaced by keras code

  • Tech With Tim
    December 7, 2020

    Fun fact I got accuracy 1.0000…. Am I wrong or did my machine learnt too much

  • Tech With Tim
    December 7, 2020

    Did anybody designed the DNN using Keras?

Write a comment