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
How-to do Sentiment Analysis with Flair in Python
2020-12-04 14:00:03 UTC
https://youtu.be/DFtP1THE8fE
DFtP1THE8fE
UCv83tO5cePwHMt1952IVVHw
DFtP1THE8fE-t799.54
So it's quite good even here where we're not saying anything particularly like a negative or positive word.
799.54
814.26
How-to do Sentiment Analysis with Flair in Python
2020-12-04 14:00:03 UTC
https://youtu.be/DFtP1THE8fE
DFtP1THE8fE
UCv83tO5cePwHMt1952IVVHw
DFtP1THE8fE-t807.06
We're just saying that the movie is or the movie delivers on the performance of striking skill and depth.
807.06
820.58
How-to do Sentiment Analysis with Flair in Python
2020-12-04 14:00:03 UTC
https://youtu.be/DFtP1THE8fE
DFtP1THE8fE
UCv83tO5cePwHMt1952IVVHw
DFtP1THE8fE-t815.3
Which must be pretty hard for a machine to understand and actually get right.
815.3
824.1
How-to do Sentiment Analysis with Flair in Python
2020-12-04 14:00:03 UTC
https://youtu.be/DFtP1THE8fE
DFtP1THE8fE
UCv83tO5cePwHMt1952IVVHw
DFtP1THE8fE-t821.14
But looking at all these it's doing really well.
821.14
828.98
How-to do Sentiment Analysis with Flair in Python
2020-12-04 14:00:03 UTC
https://youtu.be/DFtP1THE8fE
DFtP1THE8fE
UCv83tO5cePwHMt1952IVVHw
DFtP1THE8fE-t824.0999999999999
And I think it's really cool that we can actually do this with so little effort.
824.1
833.06
How-to do Sentiment Analysis with Flair in Python
2020-12-04 14:00:03 UTC
https://youtu.be/DFtP1THE8fE
DFtP1THE8fE
UCv83tO5cePwHMt1952IVVHw
DFtP1THE8fE-t829.8599999999999
And we've only actually written a few lines of code in reality.
829.86
837.86
How-to do Sentiment Analysis with Flair in Python
2020-12-04 14:00:03 UTC
https://youtu.be/DFtP1THE8fE
DFtP1THE8fE
UCv83tO5cePwHMt1952IVVHw
DFtP1THE8fE-t833.06
And it's producing really good accurate results which is really impressive to me.
833.06
840.42
How-to do Sentiment Analysis with Flair in Python
2020-12-04 14:00:03 UTC
https://youtu.be/DFtP1THE8fE
DFtP1THE8fE
UCv83tO5cePwHMt1952IVVHw
DFtP1THE8fE-t837.8599999999999
So that's it for this video.
837.86
863.62
How-to do Sentiment Analysis with Flair in Python
2020-12-04 14:00:03 UTC
https://youtu.be/DFtP1THE8fE
DFtP1THE8fE
UCv83tO5cePwHMt1952IVVHw
DFtP1THE8fE-t840.42
840.42
863.62
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t0.0
Hi and welcome to the video. Today we're going to go through how we can fine-tune a Q&A Transformer model.
0
18.4
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t7.6000000000000005
So for those of you that don't know, Q&A just means question answering and it's one of the biggest topics in NLP at the moment.
7.6
24.4
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t18.400000000000002
There's a lot of models out there where you ask a question and it will give you an answer.
18.4
33.2
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t24.4
And one of the biggest things that you need to know how to do when you are working with transformers,
24.4
41.2
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t33.2
whether that's Q&A or any of the other transformer based solutions, is how to actually fine-tune those.
33.2
51.6
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t41.2
So that's what we're going to be doing in this video. We're going to go through how we can fine-tune a Q&A Transformer model in Python.
41.2
60.8
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t51.6
So I think it's really interesting and I think you will enjoy it a lot. So let's just go ahead and we can get started.
51.6
66.8
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t60.800000000000004
Okay, so first thing we need to do is actually download our data.
60.8
74
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t66.8
So we're going to be using the SQuAD dataset, which is the Stanford question answering dataset,
66.8
82.4
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t74.0
which is essentially one of the better known Q&A datasets out there that we can use to fine-tune our model.
74
88.8
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t82.4
So let's first create a folder.
82.4
97.2
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t88.8
It's going to use OS and OSMaker.
88.8
104.8
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t97.2
We'll just call it SQuAD. Obviously, call this and organize it as you want. This is what I will be doing.
97.2
112
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t104.8
Now, the URL that we are going to be downloading this from is this.
104.8
120.4
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t112.0
Okay, and there are actually two files here that we're going to be downloading, but both will be coming from the same URL.
112
126
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t120.4
So because we're making a request through URL, we're going to import requests.
120.4
133.6
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t126.0
We can also use the Wget library as well, or if you're on Linux, you can just use Wget directly in the terminal.
126
142.4
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t133.6
It's up to you what we're going to be using requests.
133.6
148.8
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t142.4
Okay, and to request our data, we're going to be doing this.
142.4
158.8
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t148.8
So it's just a get request, use a FString, and we have the URL that we've already defined.
148.8
172
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t158.8
And then the training data that we'll be using is this file here.
158.8
181.36
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t172.0
Okay, requests. Okay, we can see that we've successfully put that data in there.
172
188.72
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t181.36
Okay, so like I said before, there's actually two of these files that we want to extract.
181.36
197.84
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t188.72
So what I'm going to do is just put this into a for loop, which will go through both of them.
188.72
202.56
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t197.84
Just copy and paste this across.
197.84
210.48
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t202.56
Rename this file.
202.56
215.2
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t210.48000000000002
And the other file is the same, but instead of train, we have dev.
210.48
220.48
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t215.2
Okay, so here we're making our request.
215.2
228
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t220.48
And then next thing we want to do after making our request is actually saving this file to our drive.
220.48
233.2
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t228.0
Okay, and we want to put that inside this squad folder here.
228
238.32
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t233.2
So to do that, we use open.
233.2
243.2
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t238.32
And again, we're going to use a string here.
238.32
248.16
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t243.2
I want to put inside the squad folder here.
243.2
254.48
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t248.16
And then here we are just going to put our file name, which is file.
248.16
257.68
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t254.48
Now we're writing this in binary because it's JSON.
254.48
262.88
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t257.68
So we put wb for our flags here.
257.68
270.08
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t262.88
And then within this namespace, we are going to run through the file and download it in chunks.
262.88
273.92
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t270.08
So we do for chunk.
270.08
279.44
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t273.92
And then we iterate through the response.
273.92
281.36
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t279.44
Like this.
279.44
288.4
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t281.36
We'll just use a chunk size of four.
281.36
292.72
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t288.40000000000003
And then we just want to write to the file like that.
288.4
296
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t292.72
So that will download both files.
292.72
297.92
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t296.0
Just add the colon there.
296
301.36
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t297.92
So that will download both files.
297.92
303.36
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t301.36
We should be able to see them here now.
301.36
305.6
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t303.36
So in here we have data.
303.36
308.32
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t305.6
We have essentially a lot of different topics.
305.6
310.16
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t308.32
So the first one is Beyonce.
308.32
318.08
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t310.16
And then in here, we will see, if we just come to here, we get a context.
310.16
323.84
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t318.08000000000004
But alongside this context, we also have QAS, which is question and answers.
318.08
330.08
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t323.84000000000003
And each one of these contains a question and answer pair.
323.84
334.08
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t330.08
So we have this question, when did Beyonce start becoming popular?
330.08
337.28
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t334.08
So this answer is actually within this context.
334.08
343.04
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t337.28
And what we want our model to do is extract the answer from that context by telling us
337.28
348
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t343.03999999999996
the start and end token of the answer within that context.
343.04
352.08
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t348.0
So we go zero and it is in the late 1990s.
348
355.52
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t352.08
And we have answer start 269.
352.08
362
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t355.52
So that means that a character 269, we get I.
355.52
366.4
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t362.0
So if we go through here, we can find it here.
362
368.56
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t366.4
OK, so this is the extract.
366.4
373.2
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t368.56
And that's what we will be aiming for our model to actually extract.
368.56
378.16
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t373.2
But there will be a start point and also the end point as well, which is not included in here.
373.2
383.04
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t378.15999999999997
But we will add that manually quite soon.
378.16
388.48
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t383.04
So that's our data, and then we'll also be testing on the dev data as well,
383.04
390.96
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t389.52000000000004
which is exactly the same.
389.52
402.16
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t399.28000000000003
OK, so we move on to the data prep.
399.28
405.36
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t403.6
So now we have our files here.
403.6
408.32
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t406.16
We're going to want to read them in.
406.16
410.96
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t408.32000000000005
So we're going to use the JSON library for that.
408.32
417.12
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t410.96
And like we saw before, there's quite a complex structure in these JSONs.
410.96
418.64
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t417.12
There's a lot of different layers.
417.12
423.76
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t418.64
So we need to use a few for loops to fill through each of these and extract what we want,
418.64
430.8
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t423.76
which is the context, questions and answers all corresponding to each other.
423.76
435.52
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t430.79999999999995
So in the end, we're going to have a list of strings, which is going to be all of these.
430.8
438.48
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t435.52
And in the case of the answers, we also have the starting position.
435.52
446.4
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t438.48
So it will be a list of dictionaries where one value is a text and one value is the starting position.
438.48
452.32
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t447.84000000000003
So to do that, we're going to define a function called Rebsquad.
447.84
458.8
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t457.28000000000003
We'll define our path here as well.
457.28
464.88
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t460.72
And the first thing we need to do is actually open the JSON file.
460.72
467.68
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t464.88
So we do with open path.
464.88
472
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t468.4
And again, we are using a binary file.
468.4
474
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t472.0
So we're going to have B as a flag.
472
476.4
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t474.48
But instead of writing, we are reading.
474.48
477.52
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t476.4
So use R here.
476.4
478.48
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t477.52
So RB.
477.52
491.6
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t488.96
I'm just going to do JSON load F here.
488.96
496.8
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t491.6
So now we have our dictionary within this squad dict here.
491.6
503.68
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t497.44
So maybe whilst we're just building this function up, it's probably more useful to do it here.
497.44
505.44
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t503.68
So we can see what we're actually doing.
503.68
507.04
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t505.44
So let's copy that across.
505.44
513.52