CrashCourse · @crashcourse
Make an AI sound like a YouTuber (LAB): Crash Course AI #8
Uploaded June 7, 2020 · Length 16:00
Summary
Learn how to build an AI model in Python to generate text that sounds like a specific person, like John Green, by cleaning data and training a language model.
- python ai tutorial
- natural language processing
- text generation model
- john green ai
- machine learning lab
Transcript preview
The first 2 minutes of the transcript. Select a timestamp to watch that moment on YouTube.
- 0:00
Flower, dog, anxious, senior, car, Item, president, worried, avacado, Zendaya,
- 0:11
licorice, Nerdfighter, toothbrush, zany, expedient,
- 0:18
This isn’t really a vlogbrothers video.
- 0:20
It’s just a random string of words.
- 0:22
There aren’t any coherent sentences.
- 0:25
It looks like John Green bot could use some help speaking a bit more like human John Green
- 0:29
- sounds like an excellent task for Natural Language Processing.
- 0:33
INTRO
- 0:42
Hey, I’m Jabril and welcome to Crash Course AI!
- 0:45
Today, we’re going to tackle another hands-on lab.
- 0:49
Our goal today is to get John-Green-bot to produce language that sounds like human John
- 0:53
Green… and have some fun while doing it.
- 0:56
We’ll be writing all of our code using a language called Python in a tool called Google
- 1:00
Colaboratory, and as you watch this video, you can follow along with the code in your
- 1:04
browser from the link we put in the description.
- 1:07
In these Colaboratory files, there’s some regular text explaining what we’re trying
- 1:10
to do, and pieces of code that you can run by pushing the play button.
- 1:14
Now, these pieces of code build on each other, so keep in mind that we have to run them in
- 1:18
order from top to bottom, otherwise we might get an error.
- 1:22
To actually run the code and experiment with changing it you’ll have to either click
- 1:25
“open in playground” at the top of the page or open the File menu and click “Save
- 1:30
a Copy to Drive”.
- 1:31
And just an fyi: you’ll need a Google account for this.
- 1:34
Now, we’re going to build an AI model that plays a clever game of fill-in-the-blank.
- 1:38
We’ll be able to give John-Green-bot any word prompt like “good morning,” and he’ll
- 1:42
be able to finish the sentence.
- 1:44
Like any AI, John-Green-bot won’t really understand anything, but AI generally does
- 1:49
a really good job of finding and copying patterns.
- 1:51
When we teach any AI system to understand and produce language, we’re really asking
- 1:55
it to find and copy patterns in some behavior.
- 1:58
So to build a natural language processing AI, we need to do four things:


