Build & Sell Your Own Robust AI Agents using Python & OpenAI | George Steve | Skillshare

Playback Speed


1.0x


  • 0.5x
  • 0.75x
  • 1x (Normal)
  • 1.25x
  • 1.5x
  • 1.75x
  • 2x

Build & Sell Your Own Robust AI Agents using Python & OpenAI

teacher avatar George Steve, Senior Software Developer

Watch this class and thousands more

Get unlimited access to every class
Taught by industry leaders & working professionals
Topics include illustration, design, photography, and more

Watch this class and thousands more

Get unlimited access to every class
Taught by industry leaders & working professionals
Topics include illustration, design, photography, and more

Lessons in This Class

    • 1.

      Welcome to Building Your Own Robust AI Agent

      1:48

    • 2.

      Intro to Build and Sell Your Own AI Text and Image Generation Software

      7:27

    • 3.

      Create and Activate Environment Variable and Required Libraries

      6:21

    • 4.

      Setup OpenAI Secret Key and Save Securely

      2:30

    • 5.

      Import the necessary Project Libraries

      5:13

    • 6.

      Required Project Setup

      4:45

    • 7.

      Create Main Application Window

      6:04

    • 8.

      Build Chat Display Area

      4:57

    • 9.

      Create Input Box and Send Button

      8:12

    • 10.

      Define Your Functions

      5:10

    • 11.

      Handle Message Sending

      5:38

    • 12.

      Filter Message Sending to OpenAI

      10:02

    • 13.

      Append Messages to Chat Display Box

      3:44

    • 14.

      Generating Standard Images using OpenAI Dall 3

      4:08

    • 15.

      Build Display Image Popup Window

      8:26

    • 16.

      Final Project Testing and Implementation

    • 17.

      Project Execution and Deployment

      9:13

    • 18.

      End Of AI App Development and Documentation

      3:15

  • --
  • Beginner level
  • Intermediate level
  • Advanced level
  • All levels

Community Generated

The level is determined by a majority opinion of students who have reviewed this class. The teacher's recommendation is shown until at least 5 student responses are collected.

6

Students

--

Projects

About This Class

Welcome to "Build & Sell Your Own Robust AI Agents using Python & OpenAI" — the ultimate hands-on course designed to transform you from a curious learner into a profitable AI innovator. In this comprehensive course, you'll learn how to build powerful, production-ready AI applications using Python, OpenAI's GPT models, and cutting-edge prompt engineering techniques.

This course focuses specifically on building custom ChatGPT-powered AI Agents, fully functional Text Chat Applications, and AI Image Generators — tools that not only demonstrate your technical skill but can be monetized and deployed for real-world use.

You'll go step-by-step through building your own AI ChatApp, integrating speech recognition, generating high-quality images from text prompts using advanced diffusion models, and structuring your code for scalability and commercial distribution. Whether you're planning to sell these applications as software products, offer them as freelance services, or integrate them into your business, this course will equip you with the tools and strategies to succeed.

Steps to Achieve Your Goal:

  1. Master Foundations of Building AI Agents

  2. Build Your Own ChatGPT-Powered Text Chat Application

  3. Create Advanced AI Image Generators Using Text Prompts

  4. Add Functional Tools for a Full AI Creation Suite

Meet Your Teacher

Teacher Profile Image

George Steve

Senior Software Developer

Teacher

George Steve is the founder of Emenwa, a FREE WEB DESIGN CODE EDITOR for HTML, CSS and JavaScript Libraries used by developers for coding, editing, testing and building personal web projects. He is a seasoned full-stack web developer with over a decade of experience in both Front-End and Back-End development. And also someone who loves to share his knowledge with the world and most especially with beginners in the software industry. As a passionate educator and a versatile developer, George has mastered a wide range of technologies and his proficiency extends beyond coding, encompassing design tools to ensure a complete development cycle from concept to execution.

<... See full profile

Level: Beginner

Class Ratings

Expectations Met?
    Exceeded!
  • 0%
  • Yes
  • 0%
  • Somewhat
  • 0%
  • Not really
  • 0%

Why Join Skillshare?

Take award-winning Skillshare Original Classes

Each class has short lessons, hands-on projects

Your membership supports Skillshare teachers

Learn From Anywhere

Take classes on the go with the Skillshare app. Stream or download to watch on the plane, the subway, or wherever you learn best.

Transcripts

1. Welcome to Building Your Own Robust AI Agent: I will call you to this awesome cost in building and selling your own AI agents from scratch, using Python and Open AI. My name is Judge Steve, and I'm a snail developer at a Manoir Robot. In the past ten years, I've been building software, and web applications. I'll be showing you how to build your own AI agent using Python and Open AI from scratch. In this house, we're going to be using Visa Co Studio, and I'll be walking you through on how to download and install Visual AQo Studio or your computer. And I'll also introduce you to Python on how to install Python on your computer. And if you have the knowledge of Python and Visaco Studio, you can skip those videos and move to the next video. Or go ahead and get started with building our own AI agent using Python and Open AI. So we're going to be downloading some dependencies, and I'm going to show you how to download these dependencies such as Open AI for interacting with your open AI key, which is very important in this application. And then we go ahead and get all libraries that are needed for this, and I'm walking you through on how to do that step by step. So this course is fabs beginners who have a choice in building their own AI agents using Python and open AI. And if you don't even know how to build your own AI agents in this course, I'm going to also introduce you to that, and you're going to learn how to actually do that step by step. I believe that this cost is the right cost for you if you want to start generating text and images and if you want to start selling these applications in the market, because you're going to create an executable file you can be able to share with friends, or you can be able to upload and sell in the marketplace, anywhere you want, and people who pay you for that, you can be able to make cool money. Thank you so much. Let's get started as I seen you in the next video lecture. 2. Intro to Build and Sell Your Own AI Text and Image Generation Software: I welcome you to the awesome cas. If your dream has been to build a robust AI application from scratch, then this is the right case that will help you to achieve your dream. My name is Judge Steve, and I'll be showing you how to build your own deck GPT up from Scratch. Our own objective here is to build our own deck GPT, begin to interact with the AI, begin to create images, season dex GPT. Let's go ahead and see how this actually works. So first of all, I'll go right in here and I'm going to tell me about America. And if I hit Enter, and it's going to tell me things about America and all that, because I want us to do that in real life and see how this actually works, right? So let's go ahead and see how that actually works. Alright, so what again is that Dec GPT is very fast in response. So you start telling me about America and DecGPT says, certainly America can refer to several different concepts. So I'll touch on a few of the most ones, United States of America and so on. So you can see that is really so cool. This is how Dix GPT actually gives you this. It can be able to copy this. You can also share that. And one thing again is that Dex GPT is a multicolor app. It can go to the team. I can choose the default or the white color. It's the white color of Dx GPT and this is a blue color of Dex GPT. And this is a light blue color, and we also have dark blue color. It also has a light green color. It also has dark color, and then it has purple color. And that is so cool about DaktPT. And what again, is that it has speech to text. If I go ahead and hit on speech, and it says, click Okay to start speaking. And what is it gets if you print that VA, check it out. Okay. What is the name of the first person that went to the moon? Alright, so you can see that GPS actually gave me the name of the first person that went to the moon, and that is it. So that is so cool. And I can also read files from my computer. I can go ahead and upload TXT Pi. Can go ahead and check this file out, and let me go ahead and check about religion. And she says, I want to know about different regions in the world and the founders. And if I hit Enter or send, it goes on to print that out for me. Right, so you can see it gives me de GPT, there are numerous regions around the world, and it goes on to give you everything. So I'm assessing everything from my computer, no login, nothing at all. I'm just assessing this app and you're going to build this upfront scratch. Lill go ahead and look at the voice changer. This is a voice changer from this, Dex GPT, I can go ahead and record my own voice and I can add effect. I can change male to female voice, female to male voice, deep narrator, cartoon character, and echo effect. And I can touch the voice and apply the effect as well. So this is one thing about Dex GPT that I love so much. And I can go ahead and generate an image. Let's go ahead and say image of a of a beautiful. That should be beautiful baby. And if I hit Enter, it's going to generate image of a beautiful baby for us. Alright, so you can see beautiful image of a baby that Dex GPT actually generated for me, and you can see Deck GPT Image preview. You can actually preview that. Now one thing about Dec GPT is that whenever you create an image, you can download that image by seven this image to your computer or you go ahead and edit this image. Click on Edit. It's going to take you straight to Dex GPT Image Editor. So this is one of the robot things I love about Dex GPT. I don't need to go ahead to buy Photoshop or any Canvas or anything. I'll go ahead I use Deck JPTimage Editor, and also the video editor as well. Let's go ahead and say, I want to apply Gris C, C, that has applied to the image. I can also block this image. The image has been blow. I can undo whatever I've done so far. I can rotate this image. See that? I can go ahead and resize this image. I can go ahead and crop this image. Maybe I just want to crop here and check it out. That has been cropped. And I can simply go ahead and hit on save. I'll go ahead and save this image. So go ahead and close this. So, like I told you, Dex GPT is multicolor. I can go ahead and choose any color of my own choice, and blue colour is all the color I love using because that is so cool for me. And the Divorce color is also another color that I love as well. But the Bu color is my own color because that is what I love about Dex GPT. The ability to choos your own color interface or the interface of your Dx GPT up and be able to work on them and use them anyhow you want. And that is so cool. Likewise, the video editor is also so cool. You can upload any video from your computer, let's go ahead and get any video, and I can go ahead and upload this video. Alright, so once you upload your video, it goes on immediately, and you can add a trim to this video by trimming this, I can drag this. I can go ahead and drag this. I can meg two videos by clicking a meg video. I can remove audio from your video. I can export the audio. I can also replace the audio in this video. So anything I want to do, I can actually do that from DDGPT. So Dex GPT is for everybody. It is for creators, for developers, and ABTS, as well, is used for freelancers and make task. So it can generate code, it can generate videos. I can use a I voice changer and so on and do lots and lots of things. And once you click on Plushat it goes on to play your screen for you. And you can always go ahead and move about to Ts and get your view history and see whatever you've done on Dex GPT. Every query you have written, every interaction will be shown on right in here. So we're going to build our own version of Dex GPT from scratch in this cours and make sure everything works out fine. So follow me step by step, why you go ahead and create our own version of Dex GPT from scratch? Then this course is divided into two. You're going to start by learning how to populate text from Dex GPT, and then we go ahead and learn how to start populating images by creating images and saving them on our systems step by step, and everything is going to be practical. Guide and you're going to understand how this actually works. Then if you want to further enhance yourself in building AI app, you can go ahead and get Dex GPT developers Doc. That is one of the things that will help you to be able to develop your own app. So the Developers Doc actually shows everything about building D GPT and its interface and everything right in here. For now, let's go ahead and kickstart this journey immediately and start building our own De GPT up from scratch and get that sold in the market so that people can actually get that and start working. And then remember that Deck GPT has an earning opportunity for users in case you want to end with Det GPT. So thank you so much, and I'm going to see you in the next video lecture. 3. Create and Activate Environment Variable and Required Libraries: I will call you back again. And in order to start building our own custom advanced AI chat agents, we have to start off by setting up the environments, and then we go ahead and install the required libraries for this. So let me go ahead and minimize this. So we are going to use Python for this, and we're going to use Visual Code Studio to write a code. Then go ahead and remove this Ware call, and I'll have to go over to Fi and open up a folder, and then the fda I'm going to use is the Forter code chat app. Nothing is right inside. You can see that. So I'll go ahead and select that, create your old folder and select that. And that poder is right here. So now we have the chat up. What we need to do now is to go ahead and start off by creating a virtual environment. Go ahead and close this Wacom that always open. I'll go over to terminal and click on New terminal. Then over here, I'm going to create by saying Python because I'm using Windows, so I'm going to say Visual environments, and then visual environment. And if I hit Enter, I'll have visual environment created for me right here. So now I have visual environment. I have to activate this visual environment so that it can be able to start work and then go ahead and install the dependencies that is the libraries that are needed for this operation. So to activate that, all we need to do is to go ahead and say Vi vom, and we're going to use the Bworslash scripts, buw slash activate. And then we go ahead and hit Enter and we have Vishi omet activated. You can see it is now in a green color right here. So now we have the. We go ahead and install some requirements, and in here, we're going to install things like the request. Let me first of install the Open AI by saying Pep install Open AI and hit Enter, and it will start to install Open AI for us, right? So that is coming is going to take a little time, and that will be done for us. Now we are done with installation of Open AI. The reason why wet open AI is because we're going to use that as an access to open AI the GPT model, and that is the brain behind our chat assistant. And remember, we're going to need the API key from Open AI to use this. The next one that we need is the environment variable. In order to do that, we have to go ahead and install that again. We've installed and I'm going to install Python, Dash, dots, ENV, and that is for the environment variable. And that is coming up very soon that will be installed for us. So after the installation of everything that we need, I will also show you the easier way to install all these if fichal in case if you want to do that again. Then the next one we need to install is the speech recognition library. The speech recognition library, will help us with converting piece to text, and it allows the AI agents to listen to the user voice as well. So to install that, I'll go ahead and see P install speech recognition. I just hope I would not make a mistake right in here, so it's not to an error. So install speech recognition and hit Enter. And we are getting that in store that is coming up. And that is being in store for us. The next one we need to install the library is in request library. So this request library is used to send HTTP requests, which in this case, we used to communicate with external APIs, such as the open API and so on. And for that, I'm going to say PP install, then request and hit Enter, and that is coming up and it to get installed. So that is almost done. Now, to get all this installed on your computer once and for all, the easiest way to actually do that is by going over to this Foder and click on New File, and I'm going to call out to be requirements dot TXT. And now inside, I'm going to pest everything that we have installed. So if I have not installed this and I want to do that, all I need to do is to go ahead and save this file. Once you save this file and go over here, all you need to do is to say, P install R, and then I'm going to give the name of the Fi, and that is requirements dot CXT. So anytime you do this, you don't need to manual install all this one by one. Once you do that and hit Enter, you go ahead and install every package that is inside here. So you can see that he's telling me that requirement already satisfied requirements already satisfied. Srains have already installed all this. So the reason why I made this is to enable us to know about the requirements dot TXT or any name you give it, then go ahead and install all your dependencies. So official, if I need to install anything in this lecture or in this curs, we go ahead and add that requirements and then hit a store, and that we install for us immediately. So now we have able to install everything that we need. And in the next lecture, we go ahead and set up open AI key and the virtual environment, so we can be able to into GreybtO them and have a secret key secured and sieve. Thank you so much, and I'm going to see you in the next video lecture. 4. Setup OpenAI Secret Key and Save Securely: Welcome you back again. And in this video lecture, I'm going to teach you how to create a FDF environment variable, and we have done that in the previous lectures, I believe have known how to do that right now. So after we've installed the bries then the dependencies, what we need to do is to go back here and we're going to create a Pi, and I'm going to call out to be dot ENV and that is for the environment variables. And this Pi is a sensitive Pi and it's going to be used to hold sensitive information like the open AI key, right? So let's go ahead and get our open AI key right now. So go right inside here. I've shown you this platform before, and that is platform dot.com slash APIP. So go right inside here and create your own secret key. And I'm going to create this secret key right here and I'm going to name that to be hat up. So create yours and don't share your secret key with anybody. I'll go ahead and create this secret key, and then I can go ahead and copy it, right? So go ahead and copy it, and I'm going to minimize this again. Right inside this environment variable. I'll go ahead and say, open Aidscoe API undersco key, and let that be a code to the key that I just copy and I'm going to pass that. So I'm going to save this, and at the end of this lecture, I'm going to revoke this key and destroy that because you don't need to have access to this key. So I'll go ahead and sit that, and show you this because it is very important, and we're going to use that in communication with open AI. If you don't have this key, there is no way you can be able to retrieve information or respond to any information that the user has given to the AI. So this is the brain behind the communication be AI and the user. So it can be able to retrieve information, read instructions from the user, and then be able to respond to the instructions in a way that it is being structured. So in the cows, we're going to give it steady way that the AI should behave, and then go ahead and behave that way. And that is going to be as an assistant. So put it down and set it up, and in the next lecture, we go ahead and kick start immediately. Thank you, and I'm going to see you in the next video lecture. 5. Import the necessary Project Libraries: I will call you back again. And in this vital lecture, we go ahead and input the necessary libraries that we need to execute to this project. So before we can be able to do that, we have installed all these. Let's go ahead and go over here. Then you can click idea. Then click on this. I click UF, and I'm going to car this file to be chats on asco dot py. So now we have created a Python five. So this PytonFive we now accept some libraries for this project. The very first one is the OS, that is the Operator system. So it is presented with OS, and the function of this is to interact with the operator system. That is why we need to import that. Then the major one here is the Tinta. The Ti Enta is the GI to kits to create Windows, boties and other UI components. So we go ahead and say inputs. Tick, Enter as TK. So catName is too long. We can always refer that to as TK instead of calling it out to be Tick Enter. And then from this library, we'll go ahead and from this modo, go ahead and import these libraries. And I'm going to say from Tick Enter, we'll go ahead and impart the screwed text and then the message box. So these are the two libraries under Tick Enter that we need. And I'm going to also import Proquest. Remember we installed Roquess, so go ahead and import quise. And then we go ahead and Okay, let me explain what request is. Roquest helps us to send HTTP request to get image from the URL because you're going to be strain the images for this. And first to also show the images, we should have storage the PIO library. So to stop your library, go back here, or you go right inside here, you can go ahead and add a pillow and then go over here and I'm going to see Python. Hour. Then I want to see P install. But I should just install the library because I just want to be straight. Let's go ahead and say Pyto the store. Then I'm going to delete this, and I'm going to say, P install Plow. And check out this. The P is a capital P. We are the upper keys. We have to note that then hit Enter, then it will start to install Pillow library for us. So let's take note of that and show that we do that. So that is coming and gradually it will start to store. I think my Internet is very too low. So it's I start to store the library. So it's collecting packages, so I have to wait for that and successfully stored. So that is cool. Now we have Start P Library. I've also added that right here. I can go back to my chats app dot PY. Let's go ahead and see from PIL. Now, have you stored that, you can be able to see that. PIL, we go ahead and impart image and image TK. So this is going to be used to handle and display images in Tik Enter in order to see the image of anything we are going to build. So anytime you want to open image in AI, it's going to use this Pill library to do that. Then go ahead and say from IO going to impart it squa her and importa bite. ITN. So this is going to use to handle the image data in memory as a byte stream. That way inputs in that. Then the next one we need is open AI. So from Open AI, we go ahead and pot Open AI. All right. And then the next one is the dot Dave. So the dot dv is to load the development variable from the dot Eni we just created in the previous lecture. So from E V, we go ahead and and pot. Log log dot ENV. Alright, so we're associated in doing this. So let's go ahead and start immediately by importing all this on our own. Try to make sure that everything is imported because that is very, very necessary. Okay? So in the next lecture, we'll go ahead by setting up the environment so that you can be able to kick off immediately. Thank you so much, and I'm going to see you in the next video lecture. 6. Required Project Setup: In this lecture, let's go ahead and set up the application itself. So now we have been able to import the necessary vibraries. One of the things we need to do now is to load the dot E and V Pi and then go ahead and set up the open client ID. So to do that, I'll first of all load the FBI key and then other environment variables from dot ENV fi to do that. I'll go ahead and say, Lot E and V f, remember to put the parenthesis. So in that way, you can be able to reach this key or open AI key inside there. Then the next thing we need to do is to set up the Open AI client. So go ahead and say client, equal to Open AI, and we can now be able to reach the Open AI key itself. So the first one is to loot this ENV fly, and that is what we did now to reach the secret key itself. We now use the clients to actually do that. So I'm going to say, open AI API key is equal to s because you have already installed OS, so OS is equal to get E and V, and then we go ahead and pass in the variable name. Go ahead and open this again, and I'll go over here and I'll go ahead and copy this right and couse this, and I'll go right inside here, and I want to pase that variable name. So that is very important, so don't miss that because if you miss that, you can be able to actually interact with the API key. So this client is very, very important. So you can be able to do that. So the next one is to define a list of Qways that if a user imputes, it will tra the AI to generate image. It's very important. So I'm going ahead and say, image underscore key words. So I'm going to put this into a list, so I'm going to say if a user types anything like image, or how it generates that if a user types anything like a three D image, I'm going to actually do that again. If I see anything like image, and I'm going to see if a user also enter something like a generate image of, I'm going to also generate image for the user. Or if a user also says something like a Crit I'm going to say crit image of, I also generate an image. So these are key ways I'm going to track anytime a user wants image to be created. And then I'm going to give the team the color I want this application to take. That is the team. So go ahead and save the team. I'll go ahead and give some color. Then, first of all, I'll give a background color that is going to take. And for this, uh Papers, I want them to take the dark blue color. So the dark blue color is the Dx GTP, w ground color. And I'm going to add that right in here and I'm going to say 001f, then three F. So that's just the background color. Then for the message box, that's going to show the text or the responses from the AI is going to be then go ahead and give it a variable name of MSG that's called BG. So that is a message box. And then this que is going to take a color of different from dark blue but similar to w. So I have kept this color, and I'm going to show us the color so that once you finish is a dark blue color, what's not exactly the same with the first one. So MSG underscore FG. This is for the font. So the font color will also be changed to white. So we can change your font color to be black or anything. So the font color, that is the text color of the responses, and even the text that we write should be white background. So that is what I just did now. So I hope that it's cool, go ahead and save this. And this is the proper setup before can then go ahead and build the application so that the application will take up everything that we have set up right here. So pull it down, plot on with it, and if you have any question, go ahead and use the question and answer section, and I'm going to get back to you as soon as possible. Thank you so much, and I'm going to see you in the next video lecture. 7. Create Main Application Window: In this video, we go ahead and learn how to create the chat interface. So the main application interface will be created here. And in order to do that, you're going to create a class for this. So let's go ahead and start up immediately. So I go ahead and say class, chat. Alright, so we're going to write everything right inside here. And in order to do that, let's go ahead and say South dot Root and let it be equal to Root. Now, what this does is that this is the main tick intern window we just created right now. So to set window title, we can go ahead and say self root dot title. And then we go ahead and give it a title. I can go ahead and say it is AI chart and image generator. So AI chart and image generator, that is a title, and then we can go ahead and set window size. So the window size is going to be self Delta roots, Data go matri. So here, you can go ahead and set the size. I can go ahead and say the 700 by 600. Then the next one is to send the font size for the text display. So a guy say self font underscore size, and let that be equal to 11. And the next one is then go ahead and give it a color. But before then, we need to see this to see how it looks. And for us to see that, I can go ahead and end this. And to end that, this is called the starting of the application. For me to start that application, I have to go ahead and say, I then double underscore name and double underscore equal to double underscore main, double underscore. So currently, I have just started this application. So I'm going to create the main application window using roots Tk dot TK. Then I'm going to close it. So what I started right in here is what I just cruised here. So in that way, I've created the main application window. And now to create the instance of the chat app, or I'll go ahead and do is to see app is equal to hats, it should be descendant with this class, okay? Then I'm going to pass the roots because I've been using self self dot self dot, so I have to pass that in order to credit an instance of the chat up. Then I'll go ahead and start, I would say, roots that are main loop. So roots dot main loop. And then it means that have to start the tick enter event loop to keep the window open anytime that window is open, else, the window just co open and cools. So this is very important that we know about it, right? So anytime you see this Euro background, there's not that there's an arrow. So what this actually means is that this should be roots eche and not just solute dot. So, this should be root echo and you can see the Eurobground is gone. So don't run into a problem, right? It's very, very important that we actually know that. Then the next one is that we have Eurobground writing here. What it means is that we fail to define the chat application where we create the class. And to do that, we go ahead and say that this is equal to DV because I to create a function, double underscore in it, double underscore in it. So that is what I didn't do and I just want to see Europe everywhere. Let's go ahead and remove this. So everything under here is going to be inside the DV. And now you can see that the urobground or yellow Rine has gone out. And over here, you can see in the application there is no yellow line anywhere. So go ahead and save this. I show you save that. And for me to run this in Visa Co studio of to open the terminal, new terminal. And just like where we run applications previously, you can go ahead and say, PiT. Then I'm going to give the name of this app that is chat on the spot app. Sorry, that is a charts underscore up down PY. And when you hit Enter, it's going to open the application window for us. Alright, so it says that chart takes one position argument, but we are giving. So what I need to do is to go back right inside and I'm going to say save comma root. And I think we have been able to correct this bloblm and then just go ahead and save, go back here, clear this error, and I want to say Phyton charts. Underscore dot PY and hit Enter and let's see what actually happens this time around. Now, we have the application window open for us, and that is how it looks. So it actually did nothing at the moment. And I believe right now, we can go ahead and start our work. So close this. Everything Video core. I'll go ahead and close this, and this is the application window that we just created. So pull it down. And if you have any cuson, go ahead. I use the cushion at A section, and I'm going to get back to you as soon as possible. Thank you so much, and I'm going to see you in the next video lecture. 8. Build Chat Display Area: In this video, we go ahead and create the chat display area for this project. So this is that we're going to see responses from the AI and even one we write to also be populated there. So for us to do that, go ahead and say self dots chart under scroll display. So this is the name we're going to give that hat unasc display. So anytime we call that is going to always know that we're going to display image on there. Then I go ahead and say screw take because that need to help us to have a scroll takes so that if text of flows you come to screw up or scroll down. And then this has some attributes are going to enter the roots and then go ahead and wrap a text, so add up the white or the text equal to TK but what. And for any text that is going to appear on this, it's going to have a font size. So let's go ahead and give you font size. So go and s font is going to be equal to. The font I'm going to use is going to be SEGUUI. So I will using SEGUIthroughout this, and it's going to be so that font size. So now we have Nawa to describe the font. And the next one is go ahead and S. I want this to codwn the background color. That the background color be equal to all team and let the team be equal to the MSG because I told you we're going to use MSG for the chart display. So that is MSG under score B. And for the font, it's going to be white. We have already displayed that explain that here. And I see there's an Lo go ahead up with ash tag for this MSG, so you don't run into any problem. Then the font size or the font color is going to be equal to when we say FG, equal to Team, then we also bus MSG underscore FG. All right. So for that team to be active, we have to put a full initialize team above these. So immediately after the font, go ahead and say, solve that roots, self dot roots, that's config. So we'll go ahead and say the PG color that is for the bagran color is going to be equal to team and then we pass in the background color. Cause only the chart display, we have the color of this. So now we have the background color inserted. So now, for us to see that to be visible, we have to give the chart display relative position of X and a Y axis and width and height. So go ahead and say. So for that chart on the score display, dot Plax. So now we have to place it inside the main box. So go ahead and give it the tive position in X axis and let that be cut 0.05. And a relative position and Y exist and that be equal to 0.05. And the relative width is going to equal to 0.9 and our relative height, and that is equal to 0.65. Alright, now we have done this, go ahead and set this. Let's check if that actually works, and go ahead and drag this open again. So go on the A and I'm going to say Pyton charts and let's go up dot PY and hit Enter and let's see how it looks. Alright, so now you can see, this is the inbox here is Archer display. So this is where everything we are typing, we always show, right? So that is very good job. And if you open up that, you can see it is responsive and that looks good. So anytime we type, it's gonna tap you on this box. So you can see that about ground color which is dark, uh, Blue is different from the hats display box so that the two will not have the same background color. That is why I made that to be different colors. So I hope that is cool, and st good. Quiana I pull it down. And this is the code. And if heaven Crochon Quiara, use the cushion answer section, and I'm going to get back to you as soon as possible. Thank you so much, and I'm going to see you in the next video lecture. 9. Create Input Box and Send Button: We're going to create the input box, and also the send button will also be attached right in here. So for us to create the input box, we can go just very before here, and we go ahead and say the name should be, let me say soft users call Impute. So Sep Duseruncimput, is going to be a quarter TK entry because we expected something from the user, and it's going to be roots. So once a quarto, I'm still going to use Segopon for these trolls. So Segopon and plates tie the size be equal to 12. Alright. Now, we go ahead and just define what is the definition of what you just go to create. Now, we have to place that to be shown. And for that, go ahead and say self dot user that's coll imputes dot u Please. All right, with this, we can now give the relative position on the x axis is going to be equal to 0.05 comma and a relative position in the Y axis is going to be equal to 0.75 comma and the or weight is going to be quarter 0.7 coma and Rho height is going to be equal to 0.06. Alright, so now we have given this so that it is going to always stand, save this, and want to see that before we move on to writing the next song. So Python charts on this call app that PY and hit Enter and let's sit it and make sure that it works fine. Now we have created input box so you cannot type right in here. And check this out. We can also type inside here. You can see that this is not very good. Can also type inside here. We have to prevent JSAs from typing right inside here. So go ahead and close this. So for us to prevent JSAs from typing right inside here, what we need to do is to go over to the chart display and I'm going to say, I don't want Jesus to type in here and what to say, self that chart display that's config. And I'll go ahead and saying, State is going to be equal to the eboard and with this, the quiera, check it out again. Python chat undersco app dot PY. Ensure that we secure that surface so people can type. Now I can no longer type inside the A. What under the input, I can actually type, so you can see my input is actually working fine. Guia calls that. Now, I want to put the Please folder so that users can always know when to type or what to do when they cop to that place. And for me to do that, I can go ahead and move or to chart sub chart under call display dot Insert ISAT. So I want to insert a text, so I can go ahead and say TK Wicoma. And I'm going to put up a text. I want to say Wacom, Start typing. Start typing your messages. Below. Alright, so start typing your messages below. And this vitam check it out. By tom hat underscot PY. And I hope that should be correct so that people can always see and start. Alright, so not actual issues at the moment. So what I can do is to I think that might go up. I go ahead and cut this and I'm going to put that before the confit so I'm the scape character to bring this to the next line and save. And let's go back and check that. By let's go up dot PY. And I hope that should be visible by now because I want that to be a message box. Alright, so you can see that is now down. I think it went up. So welcome, Sund up your message below. So user can always know I leave a type in order to communicate with this. And then let's go ahead and try to add a Send button. So to create a Send button, go below under the imputes, and I want to say Send under BTN and leave that B equal to TK dot button. Alright, so let me go ahead and ask for attribute. So post one is zero. So next one, I'm going to give it a text, and the text name is going to be sends going to appear there, and I add some background for this. So the background color, I'm going to give it a color, a half that is 007 ACC and reconga. So the FG color that is for the text is going to whites. Alright? So the font here is T going to be my normal font, and that is Sego UI. And then the font size is going to be 11, and I'm going to make that to also be bold. Alright, so the next we put out to give is okay, that should be the position where it should be placed. So go over here and let me give a position where it should be placed. And I'm going to say St. OnscbTN that's that's place. So right now, lgahan has a relative position on the X axis is going to be equal to 0.76 comma, relative position on Y axis is going to be equal to 0.75 comma, and relative, With size is going to be 0.18 and relative height is going to be 0.06. So we have to make sure that the height is the same with the input box so that it will look good. Now go ahead and save this. And let's go ahead and check out this. So Python chart underscore up dot BY. Right, so that is it. So now you can see Guyana opened up this is responsive, and now people can type. I want to say, What is the capital of Hali, right? And Aka hit on safe or I click on prompts, and the message will deliver right inside this box. So I hope we're getting that. So Guyana put this down and the next video, we went ahead and make sure do something very interesting by learning how to type and send a message. Thank you, and I'm going to see you in the next video, Lectio. 10. Define Your Functions: In this video, we go ahead and declare the necessary functions that we're going to use for this project. So functional collation is very important because if you miss anything here, we're going to run into a problem. So the very function we're going to use. The first one is the function to send message, right? So I'm going to cut out to be send under call message and go ahead I put this solve. Event going to be equal to none. Alright, so this function is not yet complete. Therefore, they're going to remain with an error. So the next function is going to be depend underscore to underscore. Chat. Sorry, that should be append underscore to underscore. Chat. Now, I'm going to explain what each of this function does so that we can be able to understand and know when to use each of these functions because they're very necessary. So Sender and message. So the first function is to send a message is to hundred the message sending from the user. Then the next function is to append or to show the message on the display chat. Then the next function is for image generation. Someone to say, Dave ganadOdsco image. So so romped so the next function we have is going to be dev display underscoeimage, underscoe pop up. All right. So this one is going to take some arguments of self image, underscore URL. That should be URL. Alright, the essence of declaring these functions now is to help us so that once you take them, we can take them one step at a time and do go ahead and comment on each of them. So this is going to be mixed out to handle sending function. Sorry, sending a message, right? So after this one, we talk of our method to we call met a function method to so this should be method to other messages to the chart. Hazy display. All right, so let me go ahead and give the next one should be This method is going to be method to generate image using open AI, E model. So this is one to help us to generate our image, and the next one is going to be method to show the image in a pop up window. Alright, so now I'm taking time to create these methods or functions so that we can use them. And for anyone we're going to use, I'm going to let you know, so you consider that they have errors because nothing is in there. So for anyone we're going to use, I'm going to let you know, and then I'm going to explain whatever this line of code does so you can be able to master and understand what is going on here because we hand in the message. We send a message to the chat display box so you can be able to see that. The message is going to be book from the user and from the AI assistant, and the next one is to generate image. It cats if a user enters an image, and then go ahead and pop up that image in a window so that you can visualize and see the window you just correct it. So put down this, and the next video, we go ahead and start with the sa message method or function. Thank you, and I'm got to see you in the next video lecture. 11. Handle Message Sending: Alright, so we'll come back again, and here we got to start with the Fast method or function to handle the message sending. So the first we need to do is to get a message from the input, and let's go ahead and get a message from the input. So to get a message from the input, I'm going to say user underscore MSG. So this variable, I'm going to use that to always assess input from the user, so that user underscore input. Then that's it. Now, if I get this from the user, I want to remove anything called IS piece so that I can be able to reach the message. You know, this is a computer, so I want to remove extra way spaces. And to do that, I'm going to say dot stripe. So I don't Stripe to remove extra y spaces. Then if there is no message, or usually not type anything, so I'm going to use statement to do that. If not user underscore MSG, then what am I going to do? I have to do nothing. Then I'll just go ahead and return. Alright, so that is cool. Now, on the first user message, remember that we type in, we come type something on the screen, we need to play that in on the screen. So in order to play that, I'm going to say, I Self that posts on the score message, so I'm going to say if Fs sublets on the first on the scoe message to clay whatever it is on the screen, that is very important, so that we cannot append our own I want to say so that chart underscore display that config. So the state. So in order to get that rid of, I'm going to put that to be state equal to numal. So it's going to be normal state, and the numer state means no is going to write in the numer. Right. And then we go ahead and say, So dot chat on that score display that delete. So I'm going to delete that. And what I say 1.0 TK. So with this, we can delete everything that is in there and we have written depending on the size, what are the size of anything there, it can be deleted. So Kay says self dot s dot first underscore message is going to be a co first. Now we have made this to be false, guid and save. Now, for us to ensure that this is actually deleted, ghad and copy this, then we have to go right under here. And I'm going to paste this here and I'm going to change this to true. It means that it's a flag to clay the default welcome on the fed message. So guid and change this to true. So once this flag is raised, then the message is automatically deleted. So I hope that is cool. Now, have you to delete the false message? We have to show the user message in the chat once we delete the forced message. So to show the user message, all I have to do is to head and say soft dot append to chart. That's why I created all those funtial so that anyone we call to be easier for us without having error, which is, we can change this to user. So whatever you type is going to be and use that to define the user name. So it can be you or user or any name you want to give the person typing that. So, and it's going to show the user message. And to clay the inbox, anytime you send the inbox to be clay so you can be able to type the next one, go ahead and say south data user Pound that's called Impute delete. Right. Sorry it's going to be zero, zero CRT dot N. All right, now we have clay the user message, right? Now, I want you to put this down because I have done two Ts right here. We're able to play the force message on the screen. And let me say we first of all, get the message from the user. Then once you get the message from the user, we clay the welcome message on the screen and then went ahead and append the user message and then clay the impute. So put this down so that in the next lecture, I'll go ahead display that message that the user has coding can be able to see how to get that message from opened AI. All right. So it's very important we take that step at a time, so that you can be able to follow up in the next one so it can be able to understand what actually that is happening right in here. So it's a step by step lecture that helps you to know how to do your own chat application. Put this down, and I'm going to see you in the next video lecture. 12. Filter Message Sending to OpenAI: So in this video, we're going to look at message sending and receiving from open AI. So this is very important aspect of this lecture, and I wanted to pay serious attention because if you miss something here, it might be very difficult to understand it. So in order to work with this, I'm going to put this in a try catch block because we need to be to check for ever in case if they are sending messages and receiving messages from open AI. So this is what we have done at the previous lecture, um when we created the first one application, but here we do something different entirely because we check in for prompt for image. So remember that when we created this image, we created some keywords for image keyword in case if it is entered anything about images, we have to go ahead and create an image and no return a text. So we have to check that, right? So to tack that to go ahead and say, if any, right? If any keyword, so if any keyword in user message that lower. So if there's any keywad the lower for keyword in image underscore keyword. So this is the way we come in to check for the images, sorry, yeah, for images in keyword. So if we check that, we go ahead and say, image scoe URL is equal to self dot generate. Once we dictate, there is a keyword, image, w in there. So we here and get the image or generated image for user, sg. So here we generate image for user. Once you dictate a keyword related to image generation or image or three D or generate or anything image, we go ahead and do that. Right, so why and say self Dota a pen to chat. And I'm going to say, this is the assistant. The assistant is the robot itself. So you can say AI assistant or assistant. So it's just call assistant. I'm going to return a message to the user, and to return a message to user, I have to put F there I'm going to say here is the generated image. Image for the image the user input there. So I want to enter the user message. So if you say image of a host, so this is a directed image for host. So go ahead and append the user message on the score MSG. Alright, so this is the way we can be able to actually track that. Alright? So I think we are missing on the here. Gh and cut this, and I'm going to remove this one, put a single quotation mark here so that will be okay. And I'm going to enclose this with a single quotation mark as well, because we have opened up this quotation mark here and have this closed quotation mark here. If we don't close that, we might run into a very big problem. So now to show the image, I have to use this pop up. I have to cut this pop up right in here and I'm going to say solve that display image Pop up, and I'm going to show the image URL. So that should be image that's called URL. Alright. That is cool. Now, we have to check if there's an image or in there. Now, what if there is no image? What happens? So, else, we have to go and send message to open AI and get a response. So to get a response from Open AI, I'm going ahead and say response is going to be equal to clients. Remember, we have already defined client up here. So these are clients has to go to the open AI key, so to get that, so it's going to be clients dots, charts, dots completions that create. So I want to be very specific here. If you miss anything here, you might run into a problem because you're going to communicate with the model in order to send message to our API. We have different models there. You have to communicate with that. So go ahead and choose a model that you are going to use. So model is going to be equal to GPT. So we have the list of models, so anyone you choose. You can see all the models we have. So you can choose a GPT four. Ground choose GPT four as the letters because that is the letters model. 40, so that is it here. Now, this is the latest model. That's why I choose that. I don't want to use any duplicated type. So why had I return the message. So messages is going to be equal to how to give the rule. So the AI, this is what your rule is. So I'm going to enter this as a dictionary. So I'm going to say rule. The AI is playing the role of the system, and I have to tell it how to behave. So content is going to be equal to you are you are a helpful assistant. So in this role we have told the AI, the role is going to play here, right? So you just a helpful assistant and the role of the user, let's go ahead and give a rule is a rule. The role of the user is going to be user. So you are just a user and your content is going to be the content enter user unders call MSG. Alright, so if this is actually met, we have to extract the response from the AI assistant, which it goes from the open AI. And to do that, we'll go ahead and give a reply. So reply is going to be equal to response. It's going to be equal to response that choices respond the choices that should be choices and put in the first index of the first messages that you entered message that content in a way, it will now be able to generate every message that you just entered. All right. So we go ahead and show the message on the chat display itself. So I'll go ahead and say self pin to chat. Then I'll go ahead and say assistant. The assistant is AI, so you are the user or you are because I enter your name as you over here. So let's go back and check. This is where entire. This is why the AI is the assistant. All right, so I'm going to show the message from AI as a reply. So that is cool. So you can see that we have everything in Ada now. So now that is a way to show that. Well, remember this is a try accept. So we need to give the exception so that if there's an error, we go ahead and display the error in case maybe there's poor Internet or there's no network. So go ahead and say, except exception as E. So if there's an arrow or there's no intent, we can display that in the chat. So go ahead and see so dot a paint to chart. So the assistant will now speak to us, Assistant and the reply. Alright, so Sorry, I think I made a mistake. This should be apparent assistance. Then assistance is going to be now the reply because no reply is gotten, it should be the error message. So it should be. Then going to say arrow cd. So in order to give you the type of arrow that's a cord, we go ahead and display the arrow message using E. So this we go and go ahead and show you the arrow message, and you can see that on the screen. Now, we are done with handling the message or handling message from user to AI and receiving message from AI or open AI back to our application and showing that on the screen. So this is what we did now. When it's down, throw it step by step again. If I have any question under this, you can send me a message, and I'm going to get back to you as soon as possible. Thank you so much, and I'm going to see you in the next video lecture. 13. Append Messages to Chat Display Box: Alright. So in this video, let's go ahead and append messages to the chat display box. So we have this append to charts, and if you want to use that, we have to append the messages that you have gotten from open your eye to the chat display box. So can be able to see that? So let's go ahead and say self that chats on that score display that's config. Then we go ahead and enter the states. Remember that the message has to be anomer message. So the normal message, and this also enable the chat box for also a dictin. Then let's go ahead and also append your message. So so that chat displays insight and TK end Play comma. So every message from Open AI Wallace starts with F, and then the sender which is U with Cothrst and then the message from open AIs going to be message. And as go ahead and move to the next line, give there's new messages, and so on. So I think I've went outside the quotation mark. So everything should be inside quotation mark. They will have to make the chat box readable again. So to make chat box readable only without being writing to it is we go ahead and make self dot chart, display dot conflict, and then we go ahead and say stats is equal to display. Now we are made out to be read only again, and then go ahead and say, so that's chats display, that's Y V. So what this actually does for us is to enable us to scroll to the letters message. Okay? So TK dots end. Now, the very first one does the function of enabling us to edit the chat box by helping us to remove the very fast message and make the chat box to be just normal. And then we go ahead and append the new message on the chat box. Then we disable the chat box from being edited again, making it to be just it only. And then we enable the wide view, so that, it can be able to be scrolled to the end, right? So that is cool. So at the moment, we have done the append to chart, and in the next video, we also work on the generate image, and then the display image pop up. And after then we can now go over to our user imput and activate the button, the imput box, and also activate the Send button so that these functions can be entered into them, and then they can be able to work anytime we click on them or anytime we enter a text inside it. So what is down? This is just for append to charts, and that is it for now. Thank you. And I'm going to see in the next video, we're working on generate image. Thank you and see you then. 14. Generating Standard Images using OpenAI Dall 3: Alright, so we'll come back again. And in this video, we are going to learn how to generate images and open ai dow dot E model. So let's go ahead and start up immediately. Right inside, I'm going to use the response. Sorry, that is response. Equal to clients which have set that images that generate. Right, so now, first of all, you have to choose the model on, and the model for this is going to be model is going to be equal to Dow three. We're going to use a letters model, which is Dow three, then eca. And this option seems to cover everything for me. So the next one is the prompt, prompt is going to be what a user enters have said that once image once a user enters anything related to images, that means issue, capture it. Therefore, I'm going to use prompt and not just a text. Let me say prompt. The reason why I use prompt is that we have different users and anybody can write anything. So cannot capture the exact one the user entered. So prompt has to be equal to prompt. Before anything entered, then we go ahead and read that. Then we should check the number of images to generate. So to check that and what to say, number equal to one, right? Number of images to generate is equal to one. Then we go ahead and enter the size of the image, and the size of the image is going to be equal to let me say 102, four, by 1024. All right, so that is the image resoron then the next one is the standard of the image. The quality is going to be quality is going to be standard. So that is for the quality. Then the vivid artistic tie. I know the vivid artistic tie. So I'm going to enter sty equal to vivid. So bow should be vivid. So we have to give out a vivid artistic style so that the image could look so good. So this number should have a cam as well, so don't run into a problem. And now, this is all that we need. The first time we go ahead and select the model, right? So on select the model, and then we select the prompt type, that is the text prompts from the user, and then the number of images, then the size of the image resolution, then the image quality and the artistic style that should be used. And after them, we simply go ahead and return the response. So response is going to be equal to data. And I'm going to enter the first index of that. So we'll return the URA of the generated image. So starting from the First index. Wow, I have typed somewhere else dot URL. So this will help us to return the URR of the image, starting from the first index of that. And then after we go ahead and populate the image we just cap shot for the user so the user can be able to see that. So go ahead and save this. This is all for generating the image for the user, and then go ahead and look at the image pop up to view the image itself. So thank you so much. And if you have any question, go ahead and use the question and the Essa section, and I'm going to get back to you as soon as possible. Thank you, and I'm going to see you in the next video lecture. 15. Build Display Image Popup Window: In this lecture, let's go ahead and work on the display image pop up. Alright, so we are almost gradually getting to the end and it's time to display the image on a pop up and we're going to use a try accept for that. So let me go ahead and add the accept immediately. So don't waste time. So accept is an exception as E. So if image fails to load is going to show an error, that is what we just need to do. So go ahead and say message box dot show arrow. And that is going to be image image review error. So Gay and give the error message. So that is going to say could not load image. So guidance could not load image preview, and the error message will be displayed as an error isn't a Corbace. Right, so we're done with deception and for the try, we go ahead and say response is going to be equal to photo request, that's Gates. I remember instar request in the beginning of this, and I told you it's necessary for getting the fi, and we're going to get the image URL, right? So you have to get image URL so that you can be able to download the image from using the image URL. So now the image downloaded, which is image is going to be equal to Sorry, that should be image that's Open. They will use the bytes ten. So bytes ten to actually open the image from the bytes using the response that's content. So we want to open the images in bustin and then we go ahead and resize the image immediately. So image is going to be equal to image that's resize. That should be image or resize. So image that resize. So can be able to resize the image we got. And the size, I can put out to be like you say, 400 by 400. And then re sample is going to be equal to image that's resampling, and I'm going to resample that is in Lang Zos. So this is a technique that we're going to use called LangZos. So that technique will help us to recise on the sample image. So now we want to create a new pop up window to show the image and to create a new pop up window, we go ahead and create a variable called IMG under Scoe pop up and let that be corp to TK dot top level. So that's root. So we're trying to create a new window for pop up and IMG underscore pop up, that's title. So this is the title of the pop up, and it's going to be image preview. Then, alright, so now shoul image review. Then go ahead and give the size of the image windows or the pop up window as image pop up that geometry. And let that be equal to 420 by 420. All right, so now we have to apply the team about round, which is a team is a dark blue, so the dark blue. So IMG and that's called pop up, that's config. So the BG is going to be equal to team and we're going to use the background color, which is the BG. Now, we have been able to show the image. So we have to convert image to format that a tick inter can use. If you don't format that image, tick Inter cannot be able to get that image. Now, we have created window and we have to format the image so it can be able to fit into the tick Inter and tick inter can be able to use that. To do that, I'll go ahead and say tick underscore IMG is equal to image, TK PTO image. Now, I'm going to add level. So level equal to TK Level I'm going to say IMG un score pop off and IMG that is image, equal to TK underscore IMG. Then BG, equal to according to the team, and the team is the background, which is the BG. So the image is the image displaying label but it's what we just did right now. So we go ahead and keep a reference to avoid Gabg collections. And to do that, I'll go ahead and say, Lebo that image is equal to TK undercll IMG. This helps us to keep a reference to avoid Dabig collection here. And then we go ahead and say Lebo that's Liber Dot Park. Quoto X. So can we able to a pad in to that so it doesn't look so tiny. So round image should be a padund image to show that this image is the sally box. So paddy Y is a Quoteo ten. Right, so that is it. So less sure everything works out fine, and Arizona, let's go ahead and this exception should be inside of this. So go ahead and put that right inside here, and that is now closed. So the arrow here is gone. Now, this is not bitten. This is bytes cap zero. So, and I'm seeing say bisten is not defined in Pi lines. Skyline sob that so this is Bytes O and not Bytes ten. Alright, I'm very surprised. Bytes 10, IoT is IO input output, right? So everything Benequ go ahead and save this. And in next video, we now go ahead and check out our design and make sure everything works out fine. But for now, go ahead and put down the display image function in your own and show that you correct all these errors, and make sure that you don't have any error on your own for any reason or you have any issue. Let me know, and I'm going to get back to you as soon as possible. Thank you, and I'm going to see you in the next video lecture. 16. Final Project Testing and Implementation: Hi, so I welcome you back again, and it is time to test our code and ensure that everything worked out fine. So to test our code, the very first thing we need to do is to go to Impute box, which is this. We have to enable trigger because he have created the functions for send message. So guide on say sof dot user funds called Impute dot bind. So we come to initiate trigger, and then we go ahead and say, or return Come out. So that should be return. Come on. So that's send message. So this go sent on send message. So once you enter energy inside the input and the click on that it will trigger the send message to work. And that's on sent er score BTN. We have to also enable that. So if you start to work, so we can go right inside here and give it a command can say command. And let command the equal to self dot send message. Right, so that is what we need now. And if everything equal, we can drag this up and check. If there's any error, come back and check it out. So Python chart underscore up dot PY. And let's go ahead and check if everything is okay. Right now it is. Let's go ahead and enter what is your name. And I will hit Enter. And it says An arrow required missing a messages, models, stream given to be given. Now, let's go ahead and close that and check out what the problem is. All right, so take one of the error I see is that we have messages we have 03s here. So let's go ahead and save this again and try again. We have to correct all these errors by ourselves, Python chart that's called up dot PY. And let's check it out again and know what the issue might be. So guile repeats Waltz is your name and check it out again. Alright, I am AI Long Wage WE created by pon AI, and I am often referred to as Sha GPT. How can I assist you today? Could not dots is really very awesome. Check it out again. What is? Okay, let me see. Who is Missy. Let's check it out. Who is missing. And, uh Lena Messi is an agent football soccer player, widely regded as one of the greatest football footballers of all time. That is amazing. Let's go ahead and say generate image of a player and hit Enter. Let's check if that actually works. Wow, that is amazing. Can you see image preview, and we're able to generate this image. That is really, really amazing. I'm really, very impressed by this. That is great. So image of a play as shown. And now you have been able to generate your own image. And now you have your own AI chart and image generator, right from scratch to finish, go ahead and generate. They say, create or just say image of a lion. Image of a lion. And it on sand. Let's check if we actually did image of a lion. Wow, this is hiy impressed. I'm really impressed. Now we can be able to generate any image of our own choice. So you can see that this actually works fine. Now you have your own robust AI agent ready to start selling to people, shot to your friends, and stop them on your systems and start making wome money. So in the next video, we go ahead and learn how to deploy this execute this and generate a single file that will help us to be able to shut our friends and get this start working right from our laptops. So that is amazing. I will also go ahead and test that out. Thank you so much, and I've got to see you in the next video lecture. 17. Project Execution and Deployment: In this video, we go ahead and view this project we just created. So it attempt to execute this project and the poor dad create an executable file and shout fries. But before you build a project, you have to check your project again. You start off from inputting to setting up everything to writing this code and checking, handling the image. And then you able to append child to display box to append generate image and then pop up your image. Let's go ahead and view this and see what we have covered in this case. Go ahead and see Python, chart under sco up dot PY and hit Enter and let's say that again. So it's very interesting. You have come to this point, and let's go ahead and check it out. So remember that this can go up and you can enlarge the screen or go ahead and make that to be small. Let me go ahead and leave it this way. And I'm going to say what is What is Apple? And I can go ahead and click on SEND or I hit Enter and what is Apple? And it's going to give me the information here. The term Apple can refer to several teams, depending on the context, fruits, technology company, Acrony or Izodes. Let me know if you need information on a specific aspects of Apple, and you can see that this actually works fine, right? Now, let's go ahead and generate image. So let me go ahead and see image of a let me say a nosing Moda. Of nacen mother. So let's go ahead and generate image. That is good, that's realistic. The D images is what we get from here, and I'm very glad to have something so cool like this, right? So let's go ahead and check it out, guys. Wow, that is amazing. Let's drag this to here. Say, image of a nacen mother. You can see that this is too sweet. This is a three D image, very clean, and the images generated from applications are realistic images that are standard and the qualities are very great. Alright? Let's go ahead and check another image again. Let's say image of a schoolboy image of a schoolboy. So image of a schoolboy and let's send and check that out. Wow, you can see that actually looks so beautiful. And you see how clean that is, right? And it's amazing. It can create so much some pret images, and that are really very clean. So I'm really impressed by what we are getting. And that shows that you can now have your robos AI agents sold to public and the Kamibts for tech generation and image generation. So, if that is what you have AgVa wanted to do, I believe you've achieved your dream, and now your dream is complete. So if you have any question, just let me know. Let me go ahead and generate something black because I have white images and white Is to ensure that this image gets something good, Jared's image of a black school boy and girl, Jarrett's image of a Black schoolboy and Gail. This why I hadn't check it out and show that we have black and white shown not just from the white because I believe that this should be able to understand our prompts and be able to act on it, right? That is all we need. Why on earth can't you have something so clean? Why? You must always have something so clean as far as you followed me from beginning to the end of this cause. So you can see that this can actually generate any prompt, any day you need. So this is really amazing, very inspiring, very great. And I believe that you really love whatever you get and whatever you have, and whatever you're seeing now, go ahead and generate to us and start generating images. Share note your friends, and that will be very amazing. So you can be able to sell this to friends and tell them to buy from you. And there's not enough I make them not to buy because they're generating clean images and give you exact says of whatever you want. So put this down, play around with it. Now let's go ahead and generate this and itecute this to have a single file. To do that, I'll simply go right inside ESA, Python, Pi installer. So Bi installer, then double no console. So no console, then add Data. Then the number of app is charts on that scoptPY. So let's go ahead and generate this, believing everything being equal. And we need to include one F. We just need one F. So let me go ahead and include one F so that it doesn't generate so many Fs. S1f. Alright, so Python, Pi installer, everything being okay. Then no no console, then 15, then add theta, then the name of your app, and hit Enter and let's check it out. It says, No module name Pi installer. So let me go ahead and copy this. All right, first of all, I have to install Pi, so go ahead and say Pi, Python, Python P Install Pi Installer. Hit Enter, so it can be able to install Pi Installer on code or on here. So it is connecting that, and very soon Pi installer will be done. Can see it's now collecting Pi, so it can be able to recognize Pi Installer and can be able to generate this application and chat out with our friends because I hope that is what we ever wanted to do. So it takes a little time. So at the moment, were done installing Pi Installer, let me go ahead and pass back what I just wrote before. And now I can go ahead and hit Enter and let's check it out and show that is actually. And it says that one Data arrow. Alright, then go ahead and remove the one data so that it can be able to generate this. Might ahead I remove this and let's check it out again. And now it has started generating that for us. So the twinkle off an eye, that will be done, and we have our file. Right now we have this D one fully completed. So it says Build complete, the results are variable in this five disc. Now, let's go ahead and open up the folder and check it out. So this is a folder, go ahead and open it up. You can also see that right here. If you open this, you can see the disc folder here. And I will open up this and I'm going to execute this five and let me see if that actually works. And if that actually works fine, that means that is actually very great, right? So we're going to check it out. Qua ahead and see that, and I can enlarge this and I can go ahead and say I got ahead and I reduce that, so it to be very bold to us and I guide and say, What is what is biology? All right, so just ask anything what is biology. And let's ensure that this really works very well. That is great because what is biology is not printed out. It says, Brogi is the scientific study of life and living organism. It encompasses a wide range of topics. So that is amazing. Let go ahead and see create image of PytonGreat image of Python. And I'm going to send this. Let's get I see the image of Python. Wow. Let's drag this. You can see it was able to generate an image of the Python. Wow, that is great. Let's go ahead and say image of a baby, image of a baby and check it out. Wow, this is really exciting. You can see the image of a baby generated by our own design. Is that not really amazing? Why can't you share this bit of phrase? It's very, very great, and I'm very happy we have this and we are generating such beautiful images from our own application. So thank you so much, and I'm going to see you in the next video lecture. 18. End Of AI App Development and Documentation: I'm very glad we have come to the end of this cause. And I believe that through this journey, you are able to generate text and able to generate images, and you're able to be your own interface of Dex GPT. So you can name your application anything other than Dex GPT, because ex GPT is already a viral app and you cannot compete with it at the moment, so you can name your any other thing, and then you go on. So if you want to improve more on this and how to upgrade your application by making it to look so robust like Dex GPT, all you need to do is to get the Dex GPT documentation. The world we have here is Dex GPT AI documentation Version 1.00. So over here, we can go over to the top of contents. We have all these. So you can see the system requirements, the libraries, and the inputs, the main features and functions, the class overview, additional functionalities, simple actions, active logic flow, error handling and notifications because you need to know all these. Then the storon install fi and dependencies that are needed to be installed, and the activations and so on, then we have the creating text, images and codes, generating text, images and code is in the shop what is, customizes settings, change team, manage activations, reset preferences, export and self responses, then switching teams, font size adjustments, the mini settings, and so on. So you can see that actually looks so good. And that is really very interested. Even on how to API key management, and then modifying API keys, licensing and distributions, and so on, and that is so cool. So when you get this, it will help you to understand how the system works and what and what you need to install. Like here, dependencies, Tinker pillow requires opening and so on. And when you take this down more, you can be able to get that. So this is just my, and you can go ahead and get your own documentation, and that will actually help you to build your skill. So if you are interested in building your skill and developing your AI, skill in building robos application, I think it is time for you to get started at the moment, because with Dex GPT, you can be able to go far and be able to do more using this application. And then you can sell that to your friends and make money from people. So I believe I've done my job by coming to the end of this course, and I'm glad you also came to the end of this course with me, and I believe that if you have reached to this end, it means that you are serious about building your own AI application using Python and Open AI, and we use dex tPT as a case study for this. And I believe that I have done my job, and I'm going to see you next time anytime and comes very soon. So thank you so much and hope to see you again.