title
stringlengths
12
112
published
stringlengths
19
23
url
stringlengths
28
28
video_id
stringlengths
11
11
channel_id
stringclasses
5 values
id
stringlengths
16
31
text
stringlengths
0
596
start
float64
0
37.8k
end
float64
2.18
37.8k
Build a Custom Transformer Tokenizer - Transformers From Scratch #2
2021-06-24 14:00:06 UTC
https://youtu.be/JIeAB8vvBQo
JIeAB8vvBQo
UCv83tO5cePwHMt1952IVVHw
JIeAB8vvBQo-t574.0
So when we feed text into our tokenizer, it first goes to merges.txt. And in here, we have
574
593.44
Build a Custom Transformer Tokenizer - Transformers From Scratch #2
2021-06-24 14:00:06 UTC
https://youtu.be/JIeAB8vvBQo
JIeAB8vvBQo
UCv83tO5cePwHMt1952IVVHw
JIeAB8vvBQo-t583.68
characters, words, so on. And they are translated into these tokens. So these are characters on the
583.68
600.4
Build a Custom Transformer Tokenizer - Transformers From Scratch #2
2021-06-24 14:00:06 UTC
https://youtu.be/JIeAB8vvBQo
JIeAB8vvBQo
UCv83tO5cePwHMt1952IVVHw
JIeAB8vvBQo-t593.44
right, tokens on the left. So we scroll down, we can see different ones. We can keep going.
593.44
610.8
Build a Custom Transformer Tokenizer - Transformers From Scratch #2
2021-06-24 14:00:06 UTC
https://youtu.be/JIeAB8vvBQo
JIeAB8vvBQo
UCv83tO5cePwHMt1952IVVHw
JIeAB8vvBQo-t600.4
So here we have Zeone. That's like, although my Italian is very bad, that is like the English
600.4
622
Build a Custom Transformer Tokenizer - Transformers From Scratch #2
2021-06-24 14:00:06 UTC
https://youtu.be/JIeAB8vvBQo
JIeAB8vvBQo
UCv83tO5cePwHMt1952IVVHw
JIeAB8vvBQo-t610.8
T-I-O-N. So T-I-O-N. And we would say something like attention, right? Italians have the same,
610.8
630.64
Build a Custom Transformer Tokenizer - Transformers From Scratch #2
2021-06-24 14:00:06 UTC
https://youtu.be/JIeAB8vvBQo
JIeAB8vvBQo
UCv83tO5cePwHMt1952IVVHw
JIeAB8vvBQo-t622.0
but they have like attention. So that's what we have there. So it's part of a word and it's
622
638.64
Build a Custom Transformer Tokenizer - Transformers From Scratch #2
2021-06-24 14:00:06 UTC
https://youtu.be/JIeAB8vvBQo
JIeAB8vvBQo
UCv83tO5cePwHMt1952IVVHw
JIeAB8vvBQo-t630.64
pretty common. And that gets translated into this token here. Now, after that, our tokenizer
630.64
648.08
Build a Custom Transformer Tokenizer - Transformers From Scratch #2
2021-06-24 14:00:06 UTC
https://youtu.be/JIeAB8vvBQo
JIeAB8vvBQo
UCv83tO5cePwHMt1952IVVHw
JIeAB8vvBQo-t638.64
moves into vocab.json. And I don't know why it's sorted at the bottom there. Go to the top.
638.64
657.84
Build a Custom Transformer Tokenizer - Transformers From Scratch #2
2021-06-24 14:00:06 UTC
https://youtu.be/JIeAB8vvBQo
JIeAB8vvBQo
UCv83tO5cePwHMt1952IVVHw
JIeAB8vvBQo-t648.08
If I clean this up quickly, we can see we have a JSON object. It's like a dictionary in Python.
648.08
666.32
Build a Custom Transformer Tokenizer - Transformers From Scratch #2
2021-06-24 14:00:06 UTC
https://youtu.be/JIeAB8vvBQo
JIeAB8vvBQo
UCv83tO5cePwHMt1952IVVHw
JIeAB8vvBQo-t659.0400000000001
And we have all of our tokens and the token IDs that they will get translated into. So if we
659.04
673.44
Build a Custom Transformer Tokenizer - Transformers From Scratch #2
2021-06-24 14:00:06 UTC
https://youtu.be/JIeAB8vvBQo
JIeAB8vvBQo
UCv83tO5cePwHMt1952IVVHw
JIeAB8vvBQo-t666.32
scroll down here, we should be able to find, was it VA, I think. Okay, so VA1.
666.32
681.28
Build a Custom Transformer Tokenizer - Transformers From Scratch #2
2021-06-24 14:00:06 UTC
https://youtu.be/JIeAB8vvBQo
JIeAB8vvBQo
UCv83tO5cePwHMt1952IVVHw
JIeAB8vvBQo-t673.44
Which is our Zeone into this token here. And then that eventually gets converted into this token ID.
673.44
686.96
Build a Custom Transformer Tokenizer - Transformers From Scratch #2
2021-06-24 14:00:06 UTC
https://youtu.be/JIeAB8vvBQo
JIeAB8vvBQo
UCv83tO5cePwHMt1952IVVHw
JIeAB8vvBQo-t682.1600000000001
So that's our full tokenizer process.
682.16
696
Build a Custom Transformer Tokenizer - Transformers From Scratch #2
2021-06-24 14:00:06 UTC
https://youtu.be/JIeAB8vvBQo
JIeAB8vvBQo
UCv83tO5cePwHMt1952IVVHw
JIeAB8vvBQo-t689.6
Just open that file back up. If we wanted to load that, we would do that like we normally would
689.6
701.44
Build a Custom Transformer Tokenizer - Transformers From Scratch #2
2021-06-24 14:00:06 UTC
https://youtu.be/JIeAB8vvBQo
JIeAB8vvBQo
UCv83tO5cePwHMt1952IVVHw
JIeAB8vvBQo-t696.0
with transformers. So we'd start from transformers. And then we would go to transformers.
696
712
Build a Custom Transformer Tokenizer - Transformers From Scratch #2
2021-06-24 14:00:06 UTC
https://youtu.be/JIeAB8vvBQo
JIeAB8vvBQo
UCv83tO5cePwHMt1952IVVHw
JIeAB8vvBQo-t701.44
So we'd start from transformers, import Roberta. So we're using a Roberta tokenizer here.
701.44
718.24
Build a Custom Transformer Tokenizer - Transformers From Scratch #2
2021-06-24 14:00:06 UTC
https://youtu.be/JIeAB8vvBQo
JIeAB8vvBQo
UCv83tO5cePwHMt1952IVVHw
JIeAB8vvBQo-t712.0
So we're both at tokenizer. We can use either the Roberta tokenizer or the fast version. It's up to you.
712
723.6
Build a Custom Transformer Tokenizer - Transformers From Scratch #2
2021-06-24 14:00:06 UTC
https://youtu.be/JIeAB8vvBQo
JIeAB8vvBQo
UCv83tO5cePwHMt1952IVVHw
JIeAB8vvBQo-t721.5200000000001
And we just initialize our tokenizer.
721.52
731.36
Build a Custom Transformer Tokenizer - Transformers From Scratch #2
2021-06-24 14:00:06 UTC
https://youtu.be/JIeAB8vvBQo
JIeAB8vvBQo
UCv83tO5cePwHMt1952IVVHw
JIeAB8vvBQo-t723.6
Like that. We front retrained. And in here, rather than putting a model name from the Huginface website,
723.6
737.84
Build a Custom Transformer Tokenizer - Transformers From Scratch #2
2021-06-24 14:00:06 UTC
https://youtu.be/JIeAB8vvBQo
JIeAB8vvBQo
UCv83tO5cePwHMt1952IVVHw
JIeAB8vvBQo-t731.36
we would put the path, the local path to our directory, our model directory.
731.36
747.68
Build a Custom Transformer Tokenizer - Transformers From Scratch #2
2021-06-24 14:00:06 UTC
https://youtu.be/JIeAB8vvBQo
JIeAB8vvBQo
UCv83tO5cePwHMt1952IVVHw
JIeAB8vvBQo-t739.28
So it's filiberta for us. And then we can use that to begin encoding text. So
739.28
755.04
Build a Custom Transformer Tokenizer - Transformers From Scratch #2
2021-06-24 14:00:06 UTC
https://youtu.be/JIeAB8vvBQo
JIeAB8vvBQo
UCv83tO5cePwHMt1952IVVHw
JIeAB8vvBQo-t747.68
go ciao, come va, which is like hi, how are you?
747.68
765.2
Build a Custom Transformer Tokenizer - Transformers From Scratch #2
2021-06-24 14:00:06 UTC
https://youtu.be/JIeAB8vvBQo
JIeAB8vvBQo
UCv83tO5cePwHMt1952IVVHw
JIeAB8vvBQo-t756.4
If we write that, we can see that we get these are the tokens here. I wonder if we did a 10.
756.4
772.08
Build a Custom Transformer Tokenizer - Transformers From Scratch #2
2021-06-24 14:00:06 UTC
https://youtu.be/JIeAB8vvBQo
JIeAB8vvBQo
UCv83tO5cePwHMt1952IVVHw
JIeAB8vvBQo-t766.0799999999999
So I'll do that. I'll try in a minute. So we have the starter sequence token here.
766.08
783.44
Build a Custom Transformer Tokenizer - Transformers From Scratch #2
2021-06-24 14:00:06 UTC
https://youtu.be/JIeAB8vvBQo
JIeAB8vvBQo
UCv83tO5cePwHMt1952IVVHw
JIeAB8vvBQo-t772.08
And the sequence token here. So the S and the S like that. So we have those at the start and end of each
772.08
791.84
Build a Custom Transformer Tokenizer - Transformers From Scratch #2
2021-06-24 14:00:06 UTC
https://youtu.be/JIeAB8vvBQo
JIeAB8vvBQo
UCv83tO5cePwHMt1952IVVHw
JIeAB8vvBQo-t785.44
sequence. And we can also add padding in there. So padding equals max length. And also max length
785.44
799.44
Build a Custom Transformer Tokenizer - Transformers From Scratch #2
2021-06-24 14:00:06 UTC
https://youtu.be/JIeAB8vvBQo
JIeAB8vvBQo
UCv83tO5cePwHMt1952IVVHw
JIeAB8vvBQo-t791.84
needs to have a value as well. So max length, 12. And then we get these padding tokens, which are the ones.
791.84
806
Build a Custom Transformer Tokenizer - Transformers From Scratch #2
2021-06-24 14:00:06 UTC
https://youtu.be/JIeAB8vvBQo
JIeAB8vvBQo
UCv83tO5cePwHMt1952IVVHw
JIeAB8vvBQo-t799.44
So that's pretty cool. And I just want to, purely out of curiosity, anything else?
799.44
813.76
Build a Custom Transformer Tokenizer - Transformers From Scratch #2
2021-06-24 14:00:06 UTC
https://youtu.be/JIeAB8vvBQo
JIeAB8vvBQo
UCv83tO5cePwHMt1952IVVHw
JIeAB8vvBQo-t806.0
So we have potenzione. Let's see if we recognize the number there. So no, we don't.
806
824
Build a Custom Transformer Tokenizer - Transformers From Scratch #2
2021-06-24 14:00:06 UTC
https://youtu.be/JIeAB8vvBQo
JIeAB8vvBQo
UCv83tO5cePwHMt1952IVVHw
JIeAB8vvBQo-t813.7600000000001
So I suppose this is probably the full word. In fact, it is. So this is the full token here.
813.76
829.36
Build a Custom Transformer Tokenizer - Transformers From Scratch #2
2021-06-24 14:00:06 UTC
https://youtu.be/JIeAB8vvBQo
JIeAB8vvBQo
UCv83tO5cePwHMt1952IVVHw
JIeAB8vvBQo-t824.0
If we just do this, maybe we will get, I can't remember what number it was.
824
837.52
Build a Custom Transformer Tokenizer - Transformers From Scratch #2
2021-06-24 14:00:06 UTC
https://youtu.be/JIeAB8vvBQo
JIeAB8vvBQo
UCv83tO5cePwHMt1952IVVHw
JIeAB8vvBQo-t830.4
The 322. Maybe that's right. I'm not sure. But anyway, that's how everything works.
830.4
846.32
Build a Custom Transformer Tokenizer - Transformers From Scratch #2
2021-06-24 14:00:06 UTC
https://youtu.be/JIeAB8vvBQo
JIeAB8vvBQo
UCv83tO5cePwHMt1952IVVHw
JIeAB8vvBQo-t837.52
So that's it for this video. In the next video, we will take a look how we can use this tokenizer
837.52
854.72
Build a Custom Transformer Tokenizer - Transformers From Scratch #2
2021-06-24 14:00:06 UTC
https://youtu.be/JIeAB8vvBQo
JIeAB8vvBQo
UCv83tO5cePwHMt1952IVVHw
JIeAB8vvBQo-t846.32
to build out our input pipeline for training our actual Transformer model.
846.32
876.72
Build a Custom Transformer Tokenizer - Transformers From Scratch #2
2021-06-24 14:00:06 UTC
https://youtu.be/JIeAB8vvBQo
JIeAB8vvBQo
UCv83tO5cePwHMt1952IVVHw
JIeAB8vvBQo-t854.72
854.72
876.72
Streamlit for ML #2 - ML Models and APIs
2022-01-26 16:30:36 UTC
https://youtu.be/U0EoaFFGyTg
U0EoaFFGyTg
UCv83tO5cePwHMt1952IVVHw
U0EoaFFGyTg-t0.0
Okay, in the last video, we had a look at how to build what you can see on the screen right now.
0
10.56
Streamlit for ML #2 - ML Models and APIs
2022-01-26 16:30:36 UTC
https://youtu.be/U0EoaFFGyTg
U0EoaFFGyTg
UCv83tO5cePwHMt1952IVVHw
U0EoaFFGyTg-t5.76
A very simple interface using Streamlit.
5.76
18.72
Streamlit for ML #2 - ML Models and APIs
2022-01-26 16:30:36 UTC
https://youtu.be/U0EoaFFGyTg
U0EoaFFGyTg
UCv83tO5cePwHMt1952IVVHw
U0EoaFFGyTg-t10.56
Now, what we want to do in this video is go through how we actually build the smart part
10.56
24.72
Streamlit for ML #2 - ML Models and APIs
2022-01-26 16:30:36 UTC
https://youtu.be/U0EoaFFGyTg
U0EoaFFGyTg
UCv83tO5cePwHMt1952IVVHw
U0EoaFFGyTg-t19.52
behind the Open Domain Q&A system that we're going to put together here.
19.52
31.12
Streamlit for ML #2 - ML Models and APIs
2022-01-26 16:30:36 UTC
https://youtu.be/U0EoaFFGyTg
U0EoaFFGyTg
UCv83tO5cePwHMt1952IVVHw
U0EoaFFGyTg-t24.72
So, I said before, there are a few components to Open Domain Q&A.
24.72
32.72
Streamlit for ML #2 - ML Models and APIs
2022-01-26 16:30:36 UTC
https://youtu.be/U0EoaFFGyTg
U0EoaFFGyTg
UCv83tO5cePwHMt1952IVVHw
U0EoaFFGyTg-t31.119999999999997
We're going to stick to the first two for now.
31.12
36.16
Streamlit for ML #2 - ML Models and APIs
2022-01-26 16:30:36 UTC
https://youtu.be/U0EoaFFGyTg
U0EoaFFGyTg
UCv83tO5cePwHMt1952IVVHw
U0EoaFFGyTg-t32.72
So the Vector Database, which we're going to use Pinecone for,
32.72
42.56
Streamlit for ML #2 - ML Models and APIs
2022-01-26 16:30:36 UTC
https://youtu.be/U0EoaFFGyTg
U0EoaFFGyTg
UCv83tO5cePwHMt1952IVVHw
U0EoaFFGyTg-t36.72
and the Retriever Model, which we are going to download from Hug & Face Model Hub.
36.72
46.32
Streamlit for ML #2 - ML Models and APIs
2022-01-26 16:30:36 UTC
https://youtu.be/U0EoaFFGyTg
U0EoaFFGyTg
UCv83tO5cePwHMt1952IVVHw
U0EoaFFGyTg-t42.56
And we're going to use the Sentence Transformers library to actually implement that.
42.56
53.36
Streamlit for ML #2 - ML Models and APIs
2022-01-26 16:30:36 UTC
https://youtu.be/U0EoaFFGyTg
U0EoaFFGyTg
UCv83tO5cePwHMt1952IVVHw
U0EoaFFGyTg-t46.96
Now, the first thing we are going to want to do is create our Vector Database.
46.96
55.52
Streamlit for ML #2 - ML Models and APIs
2022-01-26 16:30:36 UTC
https://youtu.be/U0EoaFFGyTg
U0EoaFFGyTg
UCv83tO5cePwHMt1952IVVHw
U0EoaFFGyTg-t53.36
So our index.
53.36
61.68
Streamlit for ML #2 - ML Models and APIs
2022-01-26 16:30:36 UTC
https://youtu.be/U0EoaFFGyTg
U0EoaFFGyTg
UCv83tO5cePwHMt1952IVVHw
U0EoaFFGyTg-t55.519999999999996
Now, to do that, there are three parts or three steps we need to take.
55.52
63.44
Streamlit for ML #2 - ML Models and APIs
2022-01-26 16:30:36 UTC
https://youtu.be/U0EoaFFGyTg
U0EoaFFGyTg
UCv83tO5cePwHMt1952IVVHw
U0EoaFFGyTg-t61.68
First, we need to download our data.
61.68
67.76
Streamlit for ML #2 - ML Models and APIs
2022-01-26 16:30:36 UTC
https://youtu.be/U0EoaFFGyTg
U0EoaFFGyTg
UCv83tO5cePwHMt1952IVVHw
U0EoaFFGyTg-t63.44
We're going to be using the Squad Dataset from Hug & Face Datasets.
63.44
72.96
Streamlit for ML #2 - ML Models and APIs
2022-01-26 16:30:36 UTC
https://youtu.be/U0EoaFFGyTg
U0EoaFFGyTg
UCv83tO5cePwHMt1952IVVHw
U0EoaFFGyTg-t68.48
Then we want to encode those vectors, encode those paragraphs,
68.48
76.32
Streamlit for ML #2 - ML Models and APIs
2022-01-26 16:30:36 UTC
https://youtu.be/U0EoaFFGyTg
U0EoaFFGyTg
UCv83tO5cePwHMt1952IVVHw
U0EoaFFGyTg-t72.96000000000001
or what we call context, into context vectors.
72.96
82
Streamlit for ML #2 - ML Models and APIs
2022-01-26 16:30:36 UTC
https://youtu.be/U0EoaFFGyTg
U0EoaFFGyTg
UCv83tO5cePwHMt1952IVVHw
U0EoaFFGyTg-t76.96000000000001
And we use Sentence Transformers and a Retriever Model for that.
76.96
89.28
Streamlit for ML #2 - ML Models and APIs
2022-01-26 16:30:36 UTC
https://youtu.be/U0EoaFFGyTg
U0EoaFFGyTg
UCv83tO5cePwHMt1952IVVHw
U0EoaFFGyTg-t82.0
And then the next part is uploading or pushing all of those vectors into our Pinecone Vector Database.
82
96.08
Streamlit for ML #2 - ML Models and APIs
2022-01-26 16:30:36 UTC
https://youtu.be/U0EoaFFGyTg
U0EoaFFGyTg
UCv83tO5cePwHMt1952IVVHw
U0EoaFFGyTg-t90.48
So, to do all of that, we're just going to very quickly go through that code,
90.48
99.84
Streamlit for ML #2 - ML Models and APIs
2022-01-26 16:30:36 UTC
https://youtu.be/U0EoaFFGyTg
U0EoaFFGyTg
UCv83tO5cePwHMt1952IVVHw
U0EoaFFGyTg-t96.08
because it is a lot and I don't want to focus on it too much.
96.08
108.08
Streamlit for ML #2 - ML Models and APIs
2022-01-26 16:30:36 UTC
https://youtu.be/U0EoaFFGyTg
U0EoaFFGyTg
UCv83tO5cePwHMt1952IVVHw
U0EoaFFGyTg-t105.6
So here we have a script.
105.6
111.2
Streamlit for ML #2 - ML Models and APIs
2022-01-26 16:30:36 UTC
https://youtu.be/U0EoaFFGyTg
U0EoaFFGyTg
UCv83tO5cePwHMt1952IVVHw
U0EoaFFGyTg-t108.08
I'm going to maybe zoom out a little bit so you can see.
108.08
114.72
Streamlit for ML #2 - ML Models and APIs
2022-01-26 16:30:36 UTC
https://youtu.be/U0EoaFFGyTg
U0EoaFFGyTg
UCv83tO5cePwHMt1952IVVHw
U0EoaFFGyTg-t111.2
So the first thing we do is import everything.
111.2
119.12
Streamlit for ML #2 - ML Models and APIs
2022-01-26 16:30:36 UTC
https://youtu.be/U0EoaFFGyTg
U0EoaFFGyTg
UCv83tO5cePwHMt1952IVVHw
U0EoaFFGyTg-t114.72
You don't need TQDM here, but you can pip install TQDM if you do want to use that.
114.72
124
Streamlit for ML #2 - ML Models and APIs
2022-01-26 16:30:36 UTC
https://youtu.be/U0EoaFFGyTg
U0EoaFFGyTg
UCv83tO5cePwHMt1952IVVHw
U0EoaFFGyTg-t120.88
So we are from Datasets.
120.88
125.6
Streamlit for ML #2 - ML Models and APIs
2022-01-26 16:30:36 UTC
https://youtu.be/U0EoaFFGyTg
U0EoaFFGyTg
UCv83tO5cePwHMt1952IVVHw
U0EoaFFGyTg-t124.0
So this is Hug & Face Datasets.
124
127.28
Streamlit for ML #2 - ML Models and APIs
2022-01-26 16:30:36 UTC
https://youtu.be/U0EoaFFGyTg
U0EoaFFGyTg
UCv83tO5cePwHMt1952IVVHw
U0EoaFFGyTg-t125.60000000000001
You will need to install this.
125.6
132.8
Streamlit for ML #2 - ML Models and APIs
2022-01-26 16:30:36 UTC
https://youtu.be/U0EoaFFGyTg
U0EoaFFGyTg
UCv83tO5cePwHMt1952IVVHw
U0EoaFFGyTg-t127.28
So that is just a pip install Datasets.
127.28
137.12
Streamlit for ML #2 - ML Models and APIs
2022-01-26 16:30:36 UTC
https://youtu.be/U0EoaFFGyTg
U0EoaFFGyTg
UCv83tO5cePwHMt1952IVVHw
U0EoaFFGyTg-t134.56
We're going to first initialize our retriever model.
134.56
143.04
Streamlit for ML #2 - ML Models and APIs
2022-01-26 16:30:36 UTC
https://youtu.be/U0EoaFFGyTg
U0EoaFFGyTg
UCv83tO5cePwHMt1952IVVHw
U0EoaFFGyTg-t137.12
We're using the Pinecone MPNet Retriever Squad 2 Retriever Model.
137.12
148.96
Streamlit for ML #2 - ML Models and APIs
2022-01-26 16:30:36 UTC
https://youtu.be/U0EoaFFGyTg
U0EoaFFGyTg
UCv83tO5cePwHMt1952IVVHw
U0EoaFFGyTg-t143.04
So this is a retriever model that is based on the MPNet model from Microsoft.
143.04
151.52
Streamlit for ML #2 - ML Models and APIs
2022-01-26 16:30:36 UTC
https://youtu.be/U0EoaFFGyTg
U0EoaFFGyTg
UCv83tO5cePwHMt1952IVVHw
U0EoaFFGyTg-t148.96
And it's been trained on the Squad 2 Dataset.
148.96
158.56
Streamlit for ML #2 - ML Models and APIs
2022-01-26 16:30:36 UTC
https://youtu.be/U0EoaFFGyTg
U0EoaFFGyTg
UCv83tO5cePwHMt1952IVVHw
U0EoaFFGyTg-t153.04
And first thing we need to do is initialize our connection to Pinecone.
153.04
162.88
Streamlit for ML #2 - ML Models and APIs
2022-01-26 16:30:36 UTC
https://youtu.be/U0EoaFFGyTg
U0EoaFFGyTg
UCv83tO5cePwHMt1952IVVHw
U0EoaFFGyTg-t158.56
So this is where we're going to store all of our vectors.
158.56
164.96
Streamlit for ML #2 - ML Models and APIs
2022-01-26 16:30:36 UTC
https://youtu.be/U0EoaFFGyTg
U0EoaFFGyTg
UCv83tO5cePwHMt1952IVVHw
U0EoaFFGyTg-t162.88
Now to do that, you do need an API key.
162.88
172.48
Streamlit for ML #2 - ML Models and APIs
2022-01-26 16:30:36 UTC
https://youtu.be/U0EoaFFGyTg
U0EoaFFGyTg
UCv83tO5cePwHMt1952IVVHw
U0EoaFFGyTg-t164.96
I wouldn't write it in your code, but I'm going to just do that for the sake of simplicity here.
164.96
175.04
Streamlit for ML #2 - ML Models and APIs
2022-01-26 16:30:36 UTC
https://youtu.be/U0EoaFFGyTg
U0EoaFFGyTg
UCv83tO5cePwHMt1952IVVHw
U0EoaFFGyTg-t172.48000000000002
So I'm going to go to this app.pinecone.io.
172.48
176.16
Streamlit for ML #2 - ML Models and APIs
2022-01-26 16:30:36 UTC
https://youtu.be/U0EoaFFGyTg
U0EoaFFGyTg
UCv83tO5cePwHMt1952IVVHw
U0EoaFFGyTg-t175.04000000000002
And this is free by the way.
175.04
177.36
Streamlit for ML #2 - ML Models and APIs
2022-01-26 16:30:36 UTC
https://youtu.be/U0EoaFFGyTg
U0EoaFFGyTg
UCv83tO5cePwHMt1952IVVHw
U0EoaFFGyTg-t176.16
You don't have to pay anything.
176.16
183.2
Streamlit for ML #2 - ML Models and APIs
2022-01-26 16:30:36 UTC
https://youtu.be/U0EoaFFGyTg
U0EoaFFGyTg
UCv83tO5cePwHMt1952IVVHw
U0EoaFFGyTg-t178.56
So we just go to app.pinecone.io.
178.56
185.44
Streamlit for ML #2 - ML Models and APIs
2022-01-26 16:30:36 UTC
https://youtu.be/U0EoaFFGyTg
U0EoaFFGyTg
UCv83tO5cePwHMt1952IVVHw
U0EoaFFGyTg-t184.08
And then you will have to sign up.
184.08
187.04
Streamlit for ML #2 - ML Models and APIs
2022-01-26 16:30:36 UTC
https://youtu.be/U0EoaFFGyTg
U0EoaFFGyTg
UCv83tO5cePwHMt1952IVVHw
U0EoaFFGyTg-t185.44
So you create an account.
185.44
190.08
Streamlit for ML #2 - ML Models and APIs
2022-01-26 16:30:36 UTC
https://youtu.be/U0EoaFFGyTg
U0EoaFFGyTg
UCv83tO5cePwHMt1952IVVHw
U0EoaFFGyTg-t187.04000000000002
I already have one, so I don't need to worry about that.
187.04
193.84
Streamlit for ML #2 - ML Models and APIs
2022-01-26 16:30:36 UTC
https://youtu.be/U0EoaFFGyTg
U0EoaFFGyTg
UCv83tO5cePwHMt1952IVVHw
U0EoaFFGyTg-t190.08
And I have this default API key over here.
190.08
194.64
Streamlit for ML #2 - ML Models and APIs
2022-01-26 16:30:36 UTC
https://youtu.be/U0EoaFFGyTg
U0EoaFFGyTg
UCv83tO5cePwHMt1952IVVHw
U0EoaFFGyTg-t193.84
I could use that.
193.84
200.96
Streamlit for ML #2 - ML Models and APIs
2022-01-26 16:30:36 UTC
https://youtu.be/U0EoaFFGyTg
U0EoaFFGyTg
UCv83tO5cePwHMt1952IVVHw
U0EoaFFGyTg-t194.64000000000001
And yeah, I'm just going to use that so we can see the key if we want.
194.64
202.72
Streamlit for ML #2 - ML Models and APIs
2022-01-26 16:30:36 UTC
https://youtu.be/U0EoaFFGyTg
U0EoaFFGyTg
UCv83tO5cePwHMt1952IVVHw
U0EoaFFGyTg-t200.96
I want to zoom in a little bit.
200.96
204.64
Streamlit for ML #2 - ML Models and APIs
2022-01-26 16:30:36 UTC
https://youtu.be/U0EoaFFGyTg
U0EoaFFGyTg
UCv83tO5cePwHMt1952IVVHw
U0EoaFFGyTg-t202.72000000000003
Of course, it's a little bit bigger.
202.72
207.76
Streamlit for ML #2 - ML Models and APIs
2022-01-26 16:30:36 UTC
https://youtu.be/U0EoaFFGyTg
U0EoaFFGyTg
UCv83tO5cePwHMt1952IVVHw
U0EoaFFGyTg-t206.24
So we can see that.
206.24
209.84
Streamlit for ML #2 - ML Models and APIs
2022-01-26 16:30:36 UTC
https://youtu.be/U0EoaFFGyTg
U0EoaFFGyTg
UCv83tO5cePwHMt1952IVVHw
U0EoaFFGyTg-t208.96
And we can see the value there.
208.96
213.12
Streamlit for ML #2 - ML Models and APIs
2022-01-26 16:30:36 UTC
https://youtu.be/U0EoaFFGyTg
U0EoaFFGyTg
UCv83tO5cePwHMt1952IVVHw
U0EoaFFGyTg-t209.84
We can just copy it or we just press over here and copy that across.
209.84
216.8
Streamlit for ML #2 - ML Models and APIs
2022-01-26 16:30:36 UTC
https://youtu.be/U0EoaFFGyTg
U0EoaFFGyTg
UCv83tO5cePwHMt1952IVVHw
U0EoaFFGyTg-t214.64000000000001
And then I'm just going to copy that across.
214.64
220.88
Streamlit for ML #2 - ML Models and APIs
2022-01-26 16:30:36 UTC
https://youtu.be/U0EoaFFGyTg
U0EoaFFGyTg
UCv83tO5cePwHMt1952IVVHw
U0EoaFFGyTg-t216.8
And then I'm just going to paste it in here.
216.8
223.12
Streamlit for ML #2 - ML Models and APIs
2022-01-26 16:30:36 UTC
https://youtu.be/U0EoaFFGyTg
U0EoaFFGyTg
UCv83tO5cePwHMt1952IVVHw
U0EoaFFGyTg-t222.4
Okay.
222.4
227.6
Streamlit for ML #2 - ML Models and APIs
2022-01-26 16:30:36 UTC
https://youtu.be/U0EoaFFGyTg
U0EoaFFGyTg
UCv83tO5cePwHMt1952IVVHw
U0EoaFFGyTg-t223.12
Now this script, by the way, I will leave a link to this in the description.
223.12
230
Streamlit for ML #2 - ML Models and APIs
2022-01-26 16:30:36 UTC
https://youtu.be/U0EoaFFGyTg
U0EoaFFGyTg
UCv83tO5cePwHMt1952IVVHw
U0EoaFFGyTg-t227.60000000000002
So you can just download it instead of writing it all out.
227.6
233.44
Streamlit for ML #2 - ML Models and APIs
2022-01-26 16:30:36 UTC
https://youtu.be/U0EoaFFGyTg
U0EoaFFGyTg
UCv83tO5cePwHMt1952IVVHw
U0EoaFFGyTg-t230.88000000000002
Because this isn't essential to our app.
230.88
236
Streamlit for ML #2 - ML Models and APIs
2022-01-26 16:30:36 UTC
https://youtu.be/U0EoaFFGyTg
U0EoaFFGyTg
UCv83tO5cePwHMt1952IVVHw
U0EoaFFGyTg-t233.44
It's just how we build our...
233.44
243.2
Streamlit for ML #2 - ML Models and APIs
2022-01-26 16:30:36 UTC
https://youtu.be/U0EoaFFGyTg
U0EoaFFGyTg
UCv83tO5cePwHMt1952IVVHw
U0EoaFFGyTg-t236.0
We encode all of our contexts and actually saw them in our vector database.
236
246.32
Streamlit for ML #2 - ML Models and APIs
2022-01-26 16:30:36 UTC
https://youtu.be/U0EoaFFGyTg
U0EoaFFGyTg
UCv83tO5cePwHMt1952IVVHw
U0EoaFFGyTg-t243.2
So we have that.
243.2
248.96
Streamlit for ML #2 - ML Models and APIs
2022-01-26 16:30:36 UTC
https://youtu.be/U0EoaFFGyTg
U0EoaFFGyTg
UCv83tO5cePwHMt1952IVVHw
U0EoaFFGyTg-t246.32
We have the cloud environment that we're using there.
246.32
251.84
Streamlit for ML #2 - ML Models and APIs
2022-01-26 16:30:36 UTC
https://youtu.be/U0EoaFFGyTg
U0EoaFFGyTg
UCv83tO5cePwHMt1952IVVHw
U0EoaFFGyTg-t250.16
Switch this back to the app.
250.16
256.16
Streamlit for ML #2 - ML Models and APIs
2022-01-26 16:30:36 UTC
https://youtu.be/U0EoaFFGyTg
U0EoaFFGyTg
UCv83tO5cePwHMt1952IVVHw
U0EoaFFGyTg-t253.83999999999997
We want to check if the index already exists.
253.84
258.24
Streamlit for ML #2 - ML Models and APIs
2022-01-26 16:30:36 UTC
https://youtu.be/U0EoaFFGyTg
U0EoaFFGyTg
UCv83tO5cePwHMt1952IVVHw
U0EoaFFGyTg-t256.15999999999997
So I'm going to create this QA index.
256.16
262.56
Streamlit for ML #2 - ML Models and APIs
2022-01-26 16:30:36 UTC
https://youtu.be/U0EoaFFGyTg
U0EoaFFGyTg
UCv83tO5cePwHMt1952IVVHw
U0EoaFFGyTg-t258.24
Now, actually, you can see in mind I already have it because I've run this code already.
258.24
267.2