CrashCourse · @crashcourse

Make an AI sound like a YouTuber (LAB): Crash Course AI #8

Uploaded June 7, 2020 · Length 16:00

Make an AI sound like a YouTuber (LAB): Crash Course AI #8

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.

  1. 0:00

    Flower, dog, anxious, senior, car, Item, president, worried, avacado, Zendaya,

  2. 0:11

    licorice, Nerdfighter, toothbrush, zany, expedient,

  3. 0:18

    This isn’t really a vlogbrothers video.

  4. 0:20

    It’s just a random string of words.

  5. 0:22

    There aren’t any coherent sentences.

  6. 0:25

    It looks like John Green bot could use some help speaking a bit more like human John Green

  7. 0:29

    - sounds like an excellent task for Natural Language Processing.

  8. 0:33

    INTRO

  9. 0:42

    Hey, I’m Jabril and welcome to Crash Course AI!

  10. 0:45

    Today, we’re going to tackle another hands-on lab.

  11. 0:49

    Our goal today is to get John-Green-bot to produce language that sounds like human John

  12. 0:53

    Green… and have some fun while doing it.

  13. 0:56

    We’ll be writing all of our code using a language called Python in a tool called Google

  14. 1:00

    Colaboratory, and as you watch this video, you can follow along with the code in your

  15. 1:04

    browser from the link we put in the description.

  16. 1:07

    In these Colaboratory files, there’s some regular text explaining what we’re trying

  17. 1:10

    to do, and pieces of code that you can run by pushing the play button.

  18. 1:14

    Now, these pieces of code build on each other, so keep in mind that we have to run them in

  19. 1:18

    order from top to bottom, otherwise we might get an error.

  20. 1:22

    To actually run the code and experiment with changing it you’ll have to either click

  21. 1:25

    “open in playground” at the top of the page or open the File menu and click “Save

  22. 1:30

    a Copy to Drive”.

  23. 1:31

    And just an fyi: you’ll need a Google account for this.

  24. 1:34

    Now, we’re going to build an AI model that plays a clever game of fill-in-the-blank.

  25. 1:38

    We’ll be able to give John-Green-bot any word prompt like “good morning,” and he’ll

  26. 1:42

    be able to finish the sentence.

  27. 1:44

    Like any AI, John-Green-bot won’t really understand anything, but AI generally does

  28. 1:49

    a really good job of finding and copying patterns.

  29. 1:51

    When we teach any AI system to understand and produce language, we’re really asking

  30. 1:55

    it to find and copy patterns in some behavior.

  31. 1:58

    So to build a natural language processing AI, we need to do four things: