You saw on the last lesson, how to open and read a file in Python, as well as create bullet point summaries of the key points in that document. That email using an AI large language model. One thing we'll discuss in this video is telling Python where your file is. It turns out how and where files are stored in a computer is actually an important part of how computers work. Maybe you just keep many files on your desktop, or maybe you're careful about organizing your files into folders. It turns out when you ask Python to read a file, you actually have to tell it where is that file precisely. Let's dive more deeply into how all this works and how you can upload your own file. To have Python summarize for you. On your computer you may have saved many different types of data in different files. This might include documents that you saved like reports and to-do lists, and emails and spreadsheets with budgets and other types of company data. In this notebook, you see how to work with one of your own text files. Files in your computer are organized in different folders. Developers tend to use the word directories instead of folders. So if you hear me say "this file is that directory", that basically means this file is in a particular folder. And with the Jupyter notebook that you're running on this website, there is a set of folders that store different files for lesson one, lesson two, and so on. Right now, we're in lesson two. And in the lesson two folder it turns out there's actually a list of files like this. The code will run here this in a file called lesson two dot ipynb. The part of the file name after the dot is called an extension. Jupyter notebooks are files of a ipynb extension. Ipynb, if you're curious, stands for IPython notebook and then when we are importing from helper functions, it turns out that saved in a different file with a .py which stands for Python extension. Then the folder or directory at which Python looks for us for files is also called the working directory. And so if you tell it to read email dot text or recipe dot text, this current working directory and lesson two folder is the directory that Python will look in to read in the file that you want. So to understand more about working directory, let's ask the AI companion what's the folder called where Python looks for other files and which folder is that by default. And so Python looks for us in the current working directory. And as usual, if you want more elaboration, feel free to chat with your AI chatbot. So let's go through the code. In this notebook, I'm going to load a few new functions. From helper functions I'm going to import upload text files. This files in directory and also our usual print LLM response. So let me run that. And just as a reminder as you're executing these code cells, please execute them in the same order as I am. And now let's list files in directory. You see that these are the files in the current working directory. And we are to open and read this file. And then this prints the email. Then you know we get this email that we saw from the last lesson. Similarly, if we were to open the recipe run that and let us print recipe. So you get this delicious recipe for kimchi. Now let's upload a text file to upload the file to the current working directory. So I'm going to run that. It creates this upload button which I'm going to click. And this brings up a file browser. And I save on my desktop a file about London which is where I was born. So let me open up London dot text. And so now London dot text has been uploaded. And if I now, list files in directory again, then a new file London dot text has just popped up. And now I can open up this file and read it into the variable your file content. So let me run that. And if I print your file content, it prints out the file content of London dot text. And here's a nice description of London. And when you run this code, I I encourage you to create some sort of text file. Hit the upload button and upload it. If you grab a paragraph or two from a recent email or from some news article online or something. If you are running windows, you can use Microsoft Word or in the Mac, you can use the Text edit program, or you can also use Google Docs. Then go to File download as plain text dot txt that you can then upload to the Jupyter notebook. Like so. Please don't upload anything confidential. You need to change the London dot text to the name of whatever text file you actually uploaded. But if you do that, you want to see your own data run in Jupyter notebook. And then for whatever text you provide, you can then create the prompt like summarize content from the text and add it in two sentences. So this is the prompt. And let's print our response to that prompt. And now it summarizes that long piece of text about London in two sentences. In addition to providing a summary, you can also try different things, such as ask the LLM to extract the key bullet points or help you brainstorm how to make a presentation on the content you just uploaded. So I hope these examples give you some ideas of the sorts of things you can accomplish when you use AI large language models for your own text data. I hope you find this fun and also maybe useful for projects you might have. And in the next lesson, we'll continue to explore how to handle text data even more sophisticated ways. In particular, you see how to read contents from multiple pieces of text and determine whether or not the content is relevant for planning that dream vacation using AI. After you've tried running some of this code on your own text data, let's go on to the next video. What we'll learn how to process text, and even more sophisticated ways.