PrivateGPT: A Guide to Ask Your Documents Offline

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
a lot of people have asked me about private GPT so this is a setup where we can go offline but still use language models to ask about our personal documents and private files so I thought in this video I can show you how to install it and how to use it so we gotta navigate over to GitHub I believe in the link to this repo in the description below and in the pin comment so head over there and we can get started the first thing we want to do is just head up here and click on code here and we want to copy this URL here so let's copy that then we can head over to I'm using visual code Studio you can do whatever you want if you just want to do it locally in terminal so what I want to do now is just select the folder I want I want to go to terminal new terminal and here you can see I am in my python folder so I'm just gonna go get clone paste the URL we just copied and hit enter okay so that was quite fast you can see now I have cloned this into my folder so the next thing I want to do is just go CD private GPT okay so now we are in a folder we can do it there and you can see here we have our files the next step we want to do now is you can either head back to the GitHub repo you can scroll down here and you can find pip install or requirements.txt just copy that head back to your terminal okay so we can paste that now we need to install the requirements for this setup so I'm just going to start this I probably had a lot of those installed already but you can just let this run until it's complete and then we can move on to the next step and that is gonna be I want to find my private GPT folder here so you can see I have it installed here I want to scroll down until I find this file here called example.env I'm going to right click on that I want to rename it to only dot e and B right okay so we can have a look at it here is where we can change our model type I'm just going to keep it like this so you can do whatever you want if you want a different model here that is possible and speaking of models now we want to head back to the GitHub repo and we can scroll further down here until you find this llm default to this model here you want to download this so all you have to do is just click on that and start downloading it's about 3.5 gigabytes so it's going to take sometimes so when that is finished I will show you where to place it okay so you have downloaded the model so you can see here now in model path that this is placed in a folder called models so what we're gonna do then is go to our private GPT folder right right click on that click on new folder and we want to make this folder called models right okay so we can double click on that so let's find the model we just downloaded you can see the name is the same here so just drag that over into this folder and now we have it in here perfect the next thing we want to do now is place our documents in a specific folder called Source documents so I have this document here from baby AGI then I have done some research on the Congress hearing with some ultimate so this was what I got from the baby AGI agents so I did a whole bunch of research for me on that specific topic but it's kind of unstructured and I kind of want it in to ask some question about it so what I can do now is I can grab this PDF drag it into the source document folder so you can see it's called here now so what I want to do now is head over back to the terminal I want to go CD private GPT right then I want to go python in just dot pi so this is probably going to take some time I'm actually on my laptop now I'm not on my GPU so I'm just gonna let this run for a while so basically this is loading the document we're just gonna let this run and I come back when this is finished while this is running I just wanted to quickly show you what kind of supported extension this is now so it's basically everything it's CSV word we have email PDF Outlook messages we have PowerPoint documents so basically every text file you want you can feed into this and learn from it offline okay so that was my document uploaded that did not take long I would say that took about one to maybe one and two minutes and remember I'm on my CPU now so now we are ready to run private GPT dot Pi so I just opened up Powershell terminal so you can see a bit better so just gonna run private gpt.pi now so we are gonna load the model of course then we can enter a query so I want to go write a summary of the Congress hearing with Sam Altman okay Enter I don't know how long this is gonna take I'm on like I said a laptop so I'm just gonna let this run and I'm gonna tell you how long it took okay so that was finished that wasn't too bad I would say it took about five ten minutes on this very slow laptop let's take a look at so you what you can see here is you can see that we have the question here what's the summary of the Congress hearing we get a quite brief summary here I did something some Altman gave a testimony in the Senate hearing on AI risk stress the important of regulation of AI warn about potential okay this looks quite quite on point to be honest but I also like to see it we can see what kind of source it is it used here so it looked in the documents and it used these four sources right so pretty good what exactly is good about private TPT of course there is the private part that is very secure since it's offline so this could basically be whatever private document you want to talk about and I also think since it's offline you can load up a bunch of documents you can go on a plane or something and you can use if you have a powerful not computer you can use an llm to assist you with your work completely offline I think that's a good use case for this so it's very interesting and I kind of like it so I'm gonna be exploring more with this so yeah thank you for watching if this video gave you some value maybe leave a like or a comment and be sure to follow along along with the channel got a lot of exciting AI tutorials and videos coming up so yeah thank you for watching see you in the next one
Info
Channel: All About AI
Views: 10,024
Rating: undefined out of 5
Keywords: how to install privategpt, privategpt setup, privategpt, install privategpt, how to use private gpt, private gpt, chatgpt, ai, use chatgpt offline, chatgpt offline, how to use chatgpt offline
Id: Y7mkcHRwZ1Q
Channel Id: undefined
Length: 6min 53sec (413 seconds)
Published: Mon May 22 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.