How to create an accurate Chat Bot Response System in Python Tutorial (2021)

  Рет қаралды 466,844

Indently

Indently

3 жыл бұрын

In this tutorial I'll be showing you how you can create an accurate chat bot response system in less than 15 minutes using Python 3.8.
Get the project here:
github.com/federicocotogno/te...

Пікірлер: 285
@Indently
@Indently 2 жыл бұрын
In case you guys are curious, I've gone ahead and created an updated version of this for 2022: kzbin.info/www/bejne/l6uzkJdtiM6Fesk&ab_channel=CodePalace
@Ranjan_12267
@Ranjan_12267 Жыл бұрын
We should give only re on import ? Please clarify my doubt sir
@thegamevortex2709
@thegamevortex2709 2 жыл бұрын
I love the tutorial, You dont skip or copy paste and you dont have to install, I like you!
@Indently
@Indently 3 жыл бұрын
This goes much further than checking whether user_message == "hello"
@amobukari951
@amobukari951 3 жыл бұрын
I need the name of the tools that you are using apart from python 3.8.you also mention something after python 3.8. Didn't get it clear.if possible please kindly send me the link to download it. Thank you
@Indently
@Indently 3 жыл бұрын
This is vanilla Python 3.8 running in Pycharm
@amobukari951
@amobukari951 3 жыл бұрын
Noted sir.please anything i will let you know. I am doing it for my final year project. I would like to learn more.
@12-proga-licayanjohnlester30
@12-proga-licayanjohnlester30 3 жыл бұрын
@@Indently Can I ask you something?
@Indently
@Indently 3 жыл бұрын
@@12-proga-licayanjohnlester30 No
@LaTishaDStyles
@LaTishaDStyles Жыл бұрын
This is a great beginner tutorial and easy to follow with what I understand from my 12 days of python education! Thanks!
@tecairsolutions3847
@tecairsolutions3847 Жыл бұрын
Do you mean you will be able to build a chatbot even if you are a dummie like me
@Walking_W
@Walking_W 2 жыл бұрын
I was not expecting message probabilyty! Good job!
@ComputerScienceSimplified
@ComputerScienceSimplified 3 жыл бұрын
Awesome video, keep up the incredible work! :)
@onyejewe93
@onyejewe93 Жыл бұрын
My friend good video i love it. Also instead of using "required_words" you can just use "single_response =True" for all the responses; faster coding instead of deciding on required words just tested it and it worked👍
@user-pb6ij4or1w
@user-pb6ij4or1w 3 ай бұрын
I thought I am really good at python after watching this my confidence kinda shattered.I need a lot to learn
@jarvis_5653
@jarvis_5653 2 жыл бұрын
Wow thank you this is one of the best and simple chatbots I have seen ❤
@alejandromendoza7778
@alejandromendoza7778 2 жыл бұрын
nice man i been looking for a tutorial like this for a while something simple and to the point
@danielju8872
@danielju8872 2 жыл бұрын
SIMPLE???
@stormshadow76
@stormshadow76 Жыл бұрын
@@danielju8872 😂
@camiloroa3182
@camiloroa3182 Ай бұрын
@@danielju8872it is hahaha.
@gabrieldemacedo4184
@gabrieldemacedo4184 2 жыл бұрын
Thank you, man! Hi from Brazil!
@krishrao442
@krishrao442 2 жыл бұрын
I never thought that Chatbot coding can be so simple .. Thank You 😃
@Indently
@Indently 2 жыл бұрын
Well this is the simple form! When you start adding artificial intelligence, then it becomes interesting.
@Indently
@Indently 2 жыл бұрын
@@tjonsmith6365 Hello, if you want to get really technical, then nothing is really a chatbot. AI is not the requirement for something to be a chat bot. Humans perform if else checks on an incredibly fast a sophisticated level. Checking inputs and providing an appropriate response is what chat bots do. Again, AI, Machine Learning, & Neural Networks are not a requirement. Good luck with your codes!
@manjuaggarwal8613
@manjuaggarwal8613 2 жыл бұрын
​@@tjonsmith6365neural networks use weights and bias to activate different nodes along the network as per the requirement, so it is kinda if-else conditioning.​
@chinnuammu3254
@chinnuammu3254 2 жыл бұрын
client server connection that is the socket programming If yes can u like just share it coz it's very important for me to present my project can u like try that once
@icureboredom4282
@icureboredom4282 2 жыл бұрын
@@Indently Hey, I appreciate that this is 6 months late but is there any way you could briefly explain how one could set for example, a stranger on omegle's message as input and therefore allow your chatbot to process this and type an output? I've already made a VERY simple chatbot code, but it can't go any further without this...! 🙏🏻Please help!
@fortniteedits3737
@fortniteedits3737 3 жыл бұрын
I’ve been waiting since yesterday
@nanhole
@nanhole Жыл бұрын
Big ups homie. THE GOAT
@realnightfuryrider
@realnightfuryrider 3 жыл бұрын
hope I will learn more from your upcoming tutorials!!!! I am working on my finals project!! your kotlin tutorials are very useful for me.!! thanks @Codepalace!!
@shaundabre5552
@shaundabre5552 2 жыл бұрын
Thank u very much It helped a lot ❤️❤️
@codewithelyanan6536
@codewithelyanan6536 3 жыл бұрын
Can't wait!
@jeanray8183
@jeanray8183 2 жыл бұрын
The tutorial is great.Thanks. But... This argument --> The percentage = float(message_certainty) / float(len(recognized_words)) isn't so compatible when it is a single response, right?
@troy5553
@troy5553 Жыл бұрын
Simple and very easy :) ty
@pavanmanjunath
@pavanmanjunath 3 жыл бұрын
Thank you so much for this SIR,please can you or anyone tell me how to store the required bot responses in a seperate text file
@karimbelmokhtar5661
@karimbelmokhtar5661 2 жыл бұрын
great job so happy with your job ... keep going (thank's from algeria ) 🥰
@aminamoudjar4561
@aminamoudjar4561 2 жыл бұрын
lmaooo tp ia jabli rabi dernah ga3 men 3ando XD
@jigarkadiya4130
@jigarkadiya4130 2 жыл бұрын
if we make a medical chatbot, some of the words are used in every disease-like symptom, cure, medicine, etc. So how we can differentiate those words for every disease? because every disease has there own symptoms and medicines. @Code Palace
@vishnukumarvk4775
@vishnukumarvk4775 Жыл бұрын
Thankyou it was really usefull
@comander23456
@comander23456 Жыл бұрын
Awesome Video, This video helped me
@victonpk9783
@victonpk9783 Жыл бұрын
i've been stuck on one error! the last two lines of the code keep being programmed as wrong :( what do i do?
@junaidkhateeb
@junaidkhateeb 6 ай бұрын
Love you bro for this !
@Indently
@Indently 6 ай бұрын
Glad you enjoyed!
@nivedithan7462
@nivedithan7462 Жыл бұрын
The Best Video....Thank u so much
@BLACKDREAMIO
@BLACKDREAMIO 2 жыл бұрын
what the heck its so cool dude incredible
@NotRuofan5177
@NotRuofan5177 2 жыл бұрын
I have problems with line 55, when ever I write something in the run section and click enter, python said line 55, in print('Bot: ' + get_response(input('You: '))) and they are shown is red.
@SOMEGUY-ci8nr
@SOMEGUY-ci8nr 2 жыл бұрын
mine did that to run the de bugger and see if you can change anything or restart thats the route i did lmao
@jfinthetrap
@jfinthetrap 7 ай бұрын
Thank you , chat gpt gave complex codes , with some modules requires api keys, with your method I used chatgpt and got the good working code ❤❤
@Indently
@Indently 7 ай бұрын
Glad it helped!
@LE11Editz
@LE11Editz 2 жыл бұрын
I get an error stating: "{'Hello!': 20, "I'm doing fine, and you?": 0, 'Thank you!': 0} Traceback (most recent call last): File "C:\Users\balaj\PycharmProjects\Chatbot\main.py", line 51, in print('Bot: ' + get_response(input('You: '))) TypeError: can only concatenate str (not "NoneType") to str" I typed same code as you what do you think is wrong @Code Palace
@Lol-il8uc
@Lol-il8uc Жыл бұрын
Is using re faster than join and list compression to clear the sentence of special characters? Also this was a amazing project!
@VelikiFeniks
@VelikiFeniks 10 ай бұрын
I want to know why in percentage variable did you set message_certainty to float and lenght of the recognised_words
@MrSubir2010
@MrSubir2010 2 жыл бұрын
Simply Wondeful!!!!!!
@ycfw7017
@ycfw7017 2 жыл бұрын
Thx for this amazing tuto, i'm curious if you can do a front end for this chatbot, so that it can run on a browser.
@icureboredom4282
@icureboredom4282 2 жыл бұрын
Any luck?
@dylangreenwood8772
@dylangreenwood8772 Жыл бұрын
what if you want to have multiple response for somthing like the you want the bot the either say "Hello" or "Hi" at random how would that be done
@marcdranrebvillaflores8017
@marcdranrebvillaflores8017 2 жыл бұрын
help me a lot thank you
@DoubleTroublePranks_
@DoubleTroublePranks_ Жыл бұрын
can someone help me so my problem is when i only type the required word its gonna response normaly but for some reason if i type multible words it doesnt understand it can someone who knows much about python please help me i really just wanna know what the problem is
@jubibi390
@jubibi390 Жыл бұрын
Sir, is it possible to like import this? in messenger or any other messaging platforms? I would like to learn them cuz it seems fun.
@spacebook7004
@spacebook7004 Жыл бұрын
Thank you so much ☺
@fevad1246
@fevad1246 2 жыл бұрын
i am new to python and i have question does the import means i have to install someting else ? and it will import to the code? is this how it works ?
@gamerzgodtawan688
@gamerzgodtawan688 Жыл бұрын
Him : Thanks for watching Me : Writing second line
@felixschmid9152
@felixschmid9152 2 жыл бұрын
can you also link the code with a txt.file ?
@zhoucrance2090
@zhoucrance2090 Жыл бұрын
Thank you Sir. What if I want to sent two responses at once.
@gigigem5631
@gigigem5631 Жыл бұрын
Thank you!
@mimistories6628
@mimistories6628 Жыл бұрын
Thx bro! At first i think it is also fake like other's. But you prove me wrong i try it in vs code and its really work. This is my first time of seeing your video and you surprised me and i subscribe you 😊
@Indently
@Indently Жыл бұрын
Happy it worked for you!
@kaajxlopatacraft7081
@kaajxlopatacraft7081 Жыл бұрын
Its so good project! 👍
@ghousemohiddin4303
@ghousemohiddin4303 Жыл бұрын
Hey bro, I’ve used your code for my mini project for my graduate program. This is the most simplest yet effective chatbot. I’ve made for modifications to it, as to tell the time, date, joke, news, day, text to speech etc. but the main issue with my code is it just tells the same time everytime asked. We need to re-run our code again if we want to refreshed time. Also when asked about joke, the python returns the same joke everytime. If we want new joke we have to re-run the code. So could you please help me with this?
@prernasahu9882
@prernasahu9882 Жыл бұрын
can you tell me how you have included time in this?
@kanishkasrivastava
@kanishkasrivastava Жыл бұрын
Brother it's not working with mine can you help me
@reemahamad5573
@reemahamad5573 2 жыл бұрын
in print('Bot:' + get_response(input('You: '))) TypeError: can only concatenate str (not "NoneType") to str How can I fix this error?
@human-vc3vq
@human-vc3vq 2 жыл бұрын
thats what im searching lol
@dalianeville3978
@dalianeville3978 2 жыл бұрын
Same
@blackcoder9532
@blackcoder9532 2 жыл бұрын
Use , instead of +
@human-vc3vq
@human-vc3vq 2 жыл бұрын
@@blackcoder9532 huh?
@tronreaper8444
@tronreaper8444 2 жыл бұрын
@@blackcoder9532 yeah and then it returns with none
@nik0508
@nik0508 Жыл бұрын
hej :D tak for hjælpen
@JS-jg8tz
@JS-jg8tz Жыл бұрын
TfidfVectorizer, cosine_similarity - these 2 packages are not available in Python 3.11. So how to install it sir? Any suggestions.
@kratos6660
@kratos6660 2 жыл бұрын
hey man im trying to make it speak but like i dont know the variable of the response so can you like help?
@camiloroa3182
@camiloroa3182 Ай бұрын
Jesús Christ, thanks a lot!! I will implement this idea to my website.
@Rainbow-jv6jo
@Rainbow-jv6jo 2 жыл бұрын
Thank U sir💖
@JoeyTeam31
@JoeyTeam31 6 ай бұрын
Hi in the while True: it said it cant concatenate + str ("noneType" to str...what should i do ?
@marvelloushussaini9177
@marvelloushussaini9177 11 ай бұрын
Am having a problem with line 44 it telling 'return' outside function when I run the code, please don't know if u can help with that
@amanplayz5153
@amanplayz5153 2 жыл бұрын
I'm your 400th liker
@jabylabs1017
@jabylabs1017 2 жыл бұрын
how do i do it like for the web net fromm the nearest point?
@douglasamorim589
@douglasamorim589 2 жыл бұрын
Hello! I´ld to say, that was a great class! In my case of: TypeError: can only concatenate str (not "NoneType") to str I resolved indenting my code. Thanks.
@tejaswinireddy5114
@tejaswinireddy5114 Жыл бұрын
I can't do that could you please help me with that
@fsociety0051
@fsociety0051 Жыл бұрын
i think you are missing the max{highest_prob_list) part cuz thats where it decides which one to parse forward to execute it as a print statement
@douglasamorim589
@douglasamorim589 Жыл бұрын
@@tejaswinireddy5114 Try to indent your code
@charlieskudder2461
@charlieskudder2461 Жыл бұрын
Great video, very informative! I have a slight issue with it, the line 'print('Bot: ' + get_response(input('You: ')))' doesn't run because it doesn't like the '+', I have tried replacing with a comma but no joy. Any suggestions?
@royalreview6970
@royalreview6970 8 ай бұрын
It is happening to me also
@charlieskudder2461
@charlieskudder2461 8 ай бұрын
Check the pinned comment. Haven't watched it, but the code may be different. 👍
@surya795
@surya795 6 ай бұрын
I had an error were i declared return function in case of undefined message probability.I made the return command in straight intendation of def i had an error,when i passed within the function the message probability was undefined 😢,I hope you see my comment and reply it
@adityabahuguna9324
@adityabahuguna9324 3 жыл бұрын
Nice..
@why5805
@why5805 2 жыл бұрын
at 9:25 when i type in response it shows it as an error (unresolved reference) what should i do?pls help
@jarvis_5653
@jarvis_5653 2 жыл бұрын
Maybe you misspelled response somewhere else.
@russellpacy9390
@russellpacy9390 2 жыл бұрын
code palace, how can integrate this code to work with twilio and heroku
@any119
@any119 Жыл бұрын
very easy and great chat bot
@noxzeuz
@noxzeuz Жыл бұрын
How would i make the program terminate by using words such as bye, goodbye, cya aso?
@johnjonathanmoyo119
@johnjonathanmoyo119 2 жыл бұрын
That was an amazing video .can use your voice to let it respond through the speaker ? Try Audio next time
@blainevautour6577
@blainevautour6577 Жыл бұрын
I just added this to the deepspeech mic_vad_streaming example and it works great
@pablooliveira2410
@pablooliveira2410 Жыл бұрын
Can you help me please? How can I make a user Send a message on the bot to respond to it? I need it for a chatbot in replit.
@vijayadithyanvignesh9238
@vijayadithyanvignesh9238 2 жыл бұрын
TypeError: can only concatenate str (not "NoneType") to str everything working well,but, how can i resolve the above error
@Tortoid
@Tortoid 2 жыл бұрын
Same error buddy
@charancherry6617
@charancherry6617 6 ай бұрын
Can we put all this stuff in a front end so it can handle in web browser
@techzoid670
@techzoid670 2 жыл бұрын
great vid
@pravins7629
@pravins7629 9 ай бұрын
But how do you come up with solutions for problem statements like this?
@Rudra.Rijan365
@Rudra.Rijan365 Жыл бұрын
Om Nama Shivayaa💙🕉🌸
@CyberSecForce
@CyberSecForce 2 жыл бұрын
Super 👌 👍 😍
@majkl-iu3ee
@majkl-iu3ee 2 жыл бұрын
how to add def to response like you say bye and bot say goodbye and then will close console
@leroydanilov
@leroydanilov Жыл бұрын
Couldn't import long_responses library. It says this module doesn't exist?
@meghanagowda5898
@meghanagowda5898 9 ай бұрын
May ik which application being used here to develop this project.
@charmjewellery6395
@charmjewellery6395 2 жыл бұрын
what should i do if i want to use speech recognition as an input? so instead of typing an input i want to speak... is there a way to make that happen ?
@Moonlight-hm5og
@Moonlight-hm5og 2 жыл бұрын
i'm looking for the same answer... share with me as well if you find one.
@_Darkens_.
@_Darkens_. 3 ай бұрын
Hello, I can't find the full code in the comment section.. Need some help with the full code list
@maheshm4358
@maheshm4358 11 ай бұрын
Sir is it possible to read a CSV file and the bot will reply based on the file
@maureenalawami3245
@maureenalawami3245 8 ай бұрын
does anyone have any idea what type of algorithm is implemented?
@user-xc6yv3mm7j
@user-xc6yv3mm7j Жыл бұрын
I followed the tutorial and I tried to run the code, but it just says process finished with exit code 0, can someone help me please.
@falakkhan5141
@falakkhan5141 10 ай бұрын
unhashable list error is coming in the line highest_prob_list[bot_response] = message_probability(message, list_of_words, single_response, required_words)
@UD_MAHFOODH
@UD_MAHFOODH Жыл бұрын
Hii dear, can you tell how can I make a bot which can be helpful in the group as an admin, bot can add, remove and so on... If you know please say something about.. thanks dear.
@user-xw2tq2ml2w
@user-xw2tq2ml2w Жыл бұрын
Hello I just started on python few months ago. I wrote the script correctly but the script didn’t run
@dalianeville3978
@dalianeville3978 2 жыл бұрын
Someone help me ASAP If I for eg want it to tell jokes how do I do it I made a function in long_responses and put a few jokes but the print ('bot: '+get_response(input ("you: "))) can only concatenate str (not "function") to str Edit I got the answer never mind
@SubatomicPlanets
@SubatomicPlanets 2 жыл бұрын
I had the same error... My solution: Main.py: import random response(random.choice(long.jokes)...) long_responses.py: jokes = ["joke 1", "joke 2", "joke 3"] Basically just add the list to long_responses.py, import random to main.py and add a response with random.choice(jokes) to main.py
@terancelim705
@terancelim705 Жыл бұрын
@Indently does not work when I run the script it gave me error.
@japhethachimba174
@japhethachimba174 Жыл бұрын
How do you manage, to create such so easy to follow kudos mehn!
@shrek582
@shrek582 Жыл бұрын
does this work if I use visual studio?
@user-qk5ky1ds9i
@user-qk5ky1ds9i Жыл бұрын
bro just opened a new dimension for me
@dhruvsharma9969
@dhruvsharma9969 2 жыл бұрын
@code palace, there is an eol indentation error at the last line, is there any way to fix it?
@Indently
@Indently 2 жыл бұрын
I recommend learning what indentation means. I have a Python for beginners course on my channel, you should check it out!
@parneetkaur4124
@parneetkaur4124 Жыл бұрын
hi! could you please make one flowchart for this python code as soon as possible
@konstantinospitsiris9038
@konstantinospitsiris9038 2 жыл бұрын
Hey I have a problem it seems to have some errors in lines 56 51 and 39 if you could fix this for me🙏🏿🙏🏿🙏🏿
@Tortoid
@Tortoid 2 жыл бұрын
Just copy paste his github code
@monishnair9610
@monishnair9610 Ай бұрын
Can I know how...bot can save your details while texting
@rohit.62
@rohit.62 Жыл бұрын
Which idle you used
@aayushisoni0306
@aayushisoni0306 Жыл бұрын
I got an error response = check_all_messages(split_message) NameError: name 'check_all_messages' is not defined pls help me to solve it ASAP:(
@bonyimakaveli633
@bonyimakaveli633 Жыл бұрын
can the same work on VS code?
@RobotKingz
@RobotKingz Жыл бұрын
which app have you used?
@-TECH-fi5sk
@-TECH-fi5sk 2 жыл бұрын
This code is not running in my pycharm pleases reply library anything else
@kadirkaraduman6550
@kadirkaraduman6550 Жыл бұрын
Do you have this program for c#?
10 Nooby Mistakes Devs Often Make In Python
24:31
Indently
Рет қаралды 23 М.
Её Старший Брат Настоящий Джентельмен ❤️
00:18
Глеб Рандалайнен
Рет қаралды 7 МЛН
Chat Bot With PyTorch - NLP And Deep Learning - Python Tutorial (Part 1)
20:42
3 PYTHON AUTOMATION PROJECTS FOR BEGINNERS
17:00
Internet Made Coder
Рет қаралды 1,5 МЛН
5 Really Cool Python Functions
19:58
Indently
Рет қаралды 41 М.
Modern Graphical User Interfaces in Python
11:12
NeuralNine
Рет қаралды 1,4 МЛН
Introduction to Chatbots | NLP Tutorial | S3 E1
14:15
codebasics
Рет қаралды 42 М.
Learn Python With This ONE Project!
55:04
Tech With Tim
Рет қаралды 1,6 МЛН
Build your own AI chatbot in 2 minutes without code
8:05
Kallaway
Рет қаралды 48 М.
Её Старший Брат Настоящий Джентельмен ❤️
00:18
Глеб Рандалайнен
Рет қаралды 7 МЛН