Using The NEW GPT-4 Model To Create Cool Python Apps

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
how's it going guys as you probably know gpt4 has recently been released and I went ahead and purchased it so that we can play around with it in this video now we're going to start using gbt4 more and more throughout our projects because right now the future of development is AI assisted which means we're going to start learning how to save a lot of time actually using chat gbt to create our projects this is inevitable as AI progresses we need to know how to use this tool so that we can save a lot of time now the first question you probably have is how can you get started with using gpt4 well in the free version of Chachi BT you will not have this option so you do need to upgrade to chat GPT plus because then it's going to give you this drop down menu where you can easily select the gpt4 now the speed of gpt4 is absolutely awful you need to wait a long time for a response but it excels at tasks that require complex instruction and advanced reasoning so depending on what you're doing you're going to have to select one of these models for now GPT 3.5 should be fine for most of them but gpt4 just looks like a lot more fun so let's tap on that and right now we have a current cap of 25 messages every three hours I don't know what that's going to change to in the future they said to expect a lower cap next week as they adjust for demand apparently it's very powerful and takes a lot of resources so they need to keep up with that but the first thing we're going to try to create as always is an increment counter in Python but we want it to be a good looking increment counter so let's see what we can do can you create a very fancy looking increments counter using TK enter so we have it built in in Python it should also be able to decrement the total count now let's see what this gives us it's going to take a moment so I'm going to fast forward for you guys so after that long moment we got a lot of code back so let's copy that and see what it does and so far we have no errors which is always a beautiful sign when you're working with copy and paste but if we run this wow what a beautiful increment and decrement counter and it actually works so that's already nice but let's try to ask Chachi BT to change the background to red when the number is negative and the green one the number is positive so we will go back to Chachi PT make it so the background becomes red when the number is below zero and green when the number is higher than zero or I guess more than zero so I've modified the script to change the background color based on the count value and I'm going to fast forward this again because it is quite slow perfect so now generated all of that and we're just going to copy and paste that in and as always guys I really recommend you learn the programming language before using chat gbt because I can read all of this I can understand what it's doing which means if I see something wrong or if I see something that I want to change personally it's going to be much faster to just go inside here and do it myself and that's the major advantage of having an understanding of the programming language and the Frameworks and and everything that has to do with that programming language before actually using chatgpt chatgpt is great but it's not something that should permanently replace you learning the concepts of programming so let's rerun this and see what happens now we got this fancy counter once again but if we increment it turns nice and green and if we decrement actually I went too high it turns red so that was the first program that we created with chatgpt but what if we want to create a chat bot a very simple chat bot with a GUI in Python well let's create a new chat and try to do that so we're going to tap on gpt4 can you create a GUI for a chatbot in Python using TK inter and now we wait once again foreign and let's see this is actually a lot of code we don't really care about the instructions you said use a message you can replace the chatbot response function with your own chatbot logic just like all my videos on this channel you said message so let's see how we can use that let's delete all of this paste it all inside do we have any errors no although the formatting is a bit funky so chat Bots logic replace with your own logic message goes inside message and then we have this event which is set to none we don't know what that does doesn't matter in this moment but let's run this program and see how our chatbot handles this hello chatbot it looks beautiful I have to say this absolutely looks beautiful because now we can actually insert our own logic if we enter nothing it doesn't send anything if we say hello you said hello so now we even have this chat bot window and it looks great what happens if we go all the way to the bottom does it allow us to scroll it even allows us to scroll and let's go down a bit and see what we can do here chat history so far this looks beautiful I couldn't do this better myself if I spent hours learning TK inter so I'm actually really impressed with this and instead of having this random chatbot response let's do some incredible processing or instead of doing the incredible processing ourself we're going to ask Chachi BT to create a very nice response system can you I always ask can you just build into me to ask like a human and I guess we just need to tell it to do what it has to do to save time so crates a chat bot response system that takes an input and provides an accurate outputs depending on the user inputs show example usage I forgot to specify python but anyway let's hope it does it in Python and if it doesn't I'm going to click on stop generating but so far it looks pretty good it looks like it understood what I wanted it to do although it's just doing it with math so I think I just told it to create a calculator and I'm not actually impressed with that so oh maybe I did it wrong now we're gonna stop that and we're going to try again I'm going to change that actually to greetings create an accurate or let's say crate a function that takes in a user input and response to that user input with some friendly messages this will be used in a chat bot so it's important that that function can recognize the major keywords from the user I hope this works let's say here's a function called generate friendly response okay so here it's creating a list of possible inputs greeting responses and this is actually really interesting I'm very curious to see how this is going to work so the logic makes sense it's going to search for one of these inputs in our strings if it recognizes if it recognizes any of those it's going to return a random response from the greeting responses so hello there will be sent back if there's hello in the string if there's high or hey and so on it's going to return one of these random strings so here's some example usage we already know how this works so what we are going to do is import random and take this section over here so let's not take the example usage because we already see that this should work pretty well and we're going to paste it near the bottom before the root dot main Loop and of course we need to import random so import random now instead of this chatbot response here we're going to Nest a return or not Nest a return function but we're going to call generate friendly response and I'm going to make it a bit more explicit so we know that we're returning a string so here we have all the text that we are returning and it also has the default I'm not sure how to respond to that this is wonderful so now that we know that we can return that we can just return generate friendly response with the message as the user input now if we run this we're going to have our chatbot except this time if we say hello we should get a nice message back such as hi nice to meet you what's up and it understood that even I'm fine thanks for asking what else can we ask this we asked it how are you how's it going and what did I say I said what's up hello ah okay it is here I thought I asked it something that did not exist I'm thinking okay did I create artificial intelligence already the answer is no of course but let's just say goodbye to our Bots because we already had enough fun here bye goodbye have a great day you two mates and it's not going to understand this anyway so I'm not sure how to respond to that can you try a different question or keyword no okay so now we're in that Loop that's how it is that is our chatbot for now and it literally took less than three minutes to create this chatbot so there's still a lot to explore with Chachi pt4 I'm going to have to do that on my own time if you have anything you want for me to try out on chat gpt4 do leave it in the comment section down below I'm going to make a lot of videos using gpt4 because again it is important that we learn how to use this technology because this is the future again to create this chatbot window functionality arcade disappeared we'll just rerun it to create this simple chatbot window functionality how long do you think you could create it in 5 minutes 10 minutes half an hour sure you can play around with the documentation as much as you want you can try to Center something however you like but with chat gbt I did this in less than three minutes and do you think the customer really cares how much time and effort you put into something not at all they care that you have a beautiful product ready for them if you can do it fast they're still going to pay the same amount and you can even make it cheaper due to how fast you're doing it with chat gbt now instead of spending an hour to create an application it's going to take you five minutes so you can make millions of these and and that's just one of the major reasons to get into chat gbt of course there's a lot of complexities with the more complex apps that might require more experienced developers but to take care of simple functionalities or the basic building blocks that Junior developers would usually take care of Chachi but he's already there it is taking its step forward so I think I'm getting carried away a bit do let me know in the comment section down below what you think about gbt4 and what I should try with it in the next video but with all that being said as always thanks for watching and I'll see you in the next video
Info
Channel: Indently
Views: 47,065
Rating: undefined out of 5
Keywords: pyton, pyhton, pythn
Id: H5rgvwQT2_U
Channel Id: undefined
Length: 12min 54sec (774 seconds)
Published: Sun Mar 19 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.