Determining insert – Creating a Chatbot with Deep Learning, Python, and TensorFlow p.4




[ad_1]

Welcome to part 4 of the chatbot with Python and TensorFlow tutorial series. Leading up to this, we’ve gotten our data and begun to iterate through it. Now we’re ready to begin building the actual logic for inputting the data.

Text tutorials and sample code: https://pythonprogramming.net/insert-logic-chatbot-deep-learning-python-tensorflow/
https://pythonprogramming.net/support-donate/
https://twitter.com/sentdex
https://www.facebook.com/pythonprogramming.net/
https://www.twitch.tv/sentdex
https://plus.google.com/+sentdex

Source


[ad_2]

Comment List

  • sentdex
    January 15, 2021

    I have a query when you are checking for better score (find_existing_score(parent_id)) this function looks in our created database parent_reply if we have comment added and if the score is better, but you are ignoring that 1000 comments are in transaction that haven't gotten committed to database hence I see there is a scenario in which there would be records with child comments answering same parent comments with lower score .

  • sentdex
    January 15, 2021

    Its giving me this error json.decoder.JSONDecodeError: Unterminated string starting at: line 1 column 9 (char 8), but i already tested a lot of datasets, and the error doesn't change, i mean, it does change the line and the character but the error itself always appears

    How can i solve this??

  • sentdex
    January 15, 2021

    Hey guys,
    Even after running through admin privilege , "PermissionError: [Errno 13] Permission denied:" . Also changed security properties to full control. Any other tips?

  • sentdex
    January 15, 2021

    up

  • sentdex
    January 15, 2021

    I keep getting this error:
    UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 441: character maps to <undefined>

  • sentdex
    January 15, 2021

    Hello!
    Great video as always!
    On some research, I found out that the comments with parent_id starting with "t3_" are direct comments to the submission and wont have any parent comment. So we can save some time by just checking if that is the case before trying to find the parent body or the existing score.
    I hope this helps some of the potato owners like myself out there..haha!

  • sentdex
    January 15, 2021

    over 2 years ago scince last response but ill give this a go @sentdex

    def find_parent(pid):

    ^

    SyntaxError: invalid syntax

  • sentdex
    January 15, 2021

    I wonder what does comment "score" meaning ??

  • sentdex
    January 15, 2021

    Heey i know this Tut is a little bit older but i try this out right now but i get some errors. can someone check this out how to fix it ? i uploaded it to GitHub. maby someone can help me ^^ thanks 😀 https://github.com/Gamelounch/SamOS-Deep-Learnin-AI

  • sentdex
    January 15, 2021

    I have this error after fixing the buffer to buffering:

    Traceback (most recent call last):
    File "C:/Users/user/Desktop/ml/Chatbot Database.py", line 46, in <module>
    for row in f:
    File "C:UsersuserAppDataLocalProgramsPythonPython36libencodingscp1252.py", line 23, in decode
    return codecs.charmap_decode(input,self.errors,decoding_table)[0]
    UnicodeDecodeError: 'charmap' codec can't decode byte 0x90 in position 22: character maps to <undefined>

    Any suggestions? Thanks.

  • sentdex
    January 15, 2021

    Great explanation about Dataset that we use in BOT. Hopely more in the future. Maybe a dataset that we will use in Parking.
    Respect for all your video's.

  • sentdex
    January 15, 2021

    I was getting this error "FileNotFoundError: [Errno 2] No such file or directory:" and I couldn't open the file, so I stored the file into the same folder where the program is and
    changed the code to this -with open("RC_2007-09","r"- and it worked. I'm a beginner so I hope this may work with the next steps.

  • sentdex
    January 15, 2021

    Hello, nice tutorials, but can you make one video just for introducing the reddit dataset. For example, what is the parent_id in the dataset, what is the created_utc, etc. Stuffs like that. Thank you, again, very nice tutorials and thank you.

  • sentdex
    January 15, 2021

    Import your dataset with pandas, and get rid of all this sql stuffs.

  • sentdex
    January 15, 2021

    what is this score in this program I am not able to understand

  • sentdex
    January 15, 2021

    anybody else getting PermissionError: [Errno 13] Permission denied when running the chatbot_database.py ?

  • sentdex
    January 15, 2021

    Anyone ?

    comment_id = row['name']
    KeyError: 'name'

  • sentdex
    January 15, 2021

    with open("C:/Users/<user>/Desktop/ChatBOTpy-TF/RC_2008-01", 'w') as f:
    PermissionError: [Errno 13] Permission denied: 'C:/Users/<user>/Desktop/ChatBOTpy-TF/RC_2008-01'
    can someone tell how to reslove this problem??

  • sentdex
    January 15, 2021

    return result[0]
    ^
    IndentationError: unindent does not match any outer indentation level

    its showing this error in find_parent()

  • sentdex
    January 15, 2021

    Hey,

    For some reason the file path I used is returning a uni code error because of the fact that Windows use backslashes. I can't find a way to fix this. Does anyone know what to do?

    Thanks!

  • sentdex
    January 15, 2021

    when i tried to run it i got this error any thoughts? :File "<ipython-input-3-169a334970e5>", line 38
    with open("C:UsersMichaelDesktopDavid_Morrow{}RC_{}" .format(timeframe.split('-')[0], timeframe), buffering=1000) as f:
    ^
    SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 2-3: truncated UXXXXXXXX escape

  • sentdex
    January 15, 2021

    i am sorry but i seem to be having issues and cant find away maybe i set it up wrong but am gonna find some tutorial for beginner thanx for the help

  • sentdex
    January 15, 2021

    I ran this exact code and i get this error File "<ipython-input-6-1ea30de32c9a>", line 10
    c.execute(""""CREATE TABLE IF NOT EXITS parent_reply(parent_id TEXT PRIMARY KEY, comment_id TEXT UNIQUE, parent TEXT, comment TEXT, subreddit TEXT, unix INT, score INT)"""")
    ^
    SyntaxError: EOL while scanning string literal

Write a comment