<jupyter_start><jupyter_text>Generating the "C" TeamThis notebook uses [GPT-2](https://github.com/openai/gpt-2) to generate new fake transcripts of the "C" team based on the transcripts of existing episodes.For when you have run out of real episodes, and need to generate an infinite number of new ones!Model trained [on colaboratory](https://colab.research.google.com/drive/1Up9uwclJ4wYm9MFJhoI0_BNBqPeuY-vb), derived from [this example](https://colab.research.google.com/drive/1VLG8e7YSEwypxU-noRNhsv5dW4NfTGce) by [<NAME>](http://minimaxir.com/).Training data was manual transcripts from YouTube videos for [The "C" Team](http://www.acq-inc.com/cteam), which is only the first six episodes, plus Anchors Aweigh part 2. Thanks to folks who transcribed those episodes! This totally doesn't work with YouTube's auto transcripts, which don't have speaker markers or handle D&D vocabulary at all.Due to the randomness of model generation, re-running cells will result in fun and different results. Step 1: Load the trained C-team model in the repo<jupyter_code>import gpt_2_simple as gpt2
sess = gpt2.start_tf_sess()
gpt2.load_gpt2(sess, run_name='cteam')<jupyter_output>Loading checkpoint checkpoint/cteam/model-1000
INFO:tensorflow:Restoring parameters from checkpoint/cteam/model-1000<jupyter_text>Define a `generate` function with defaults for generating text from the model with a given prompt.The default is to generate 250 words (`length`) 4 times (`nsamples`), to see different results.<jupyter_code>def generate(prefix, temperature=0.7, nsamples=4,
             batch_size=4, length=250, **kwargs):
    while nsamples % batch_size:
        batch_size -= 1
        
    return gpt2.generate(
        sess,
        run_name='cteam',
        temperature=temperature,
        prefix=prefix,
        nsamples=nsamples,
        batch_size=batch_size,
        length=length,
        **kwargs
    )<jupyter_output><empty_output><jupyter_text>The text looks like:```speaker: says somethingother speaker: says something else```So we can see what it thinks would happen after Jerry says something by prompting it with `"jerry:"`:<jupyter_code>generate("jerry:")<jupyter_output>jerry: right?
kris: yeah.
jerry: k'thriss drow'b? (dice roll)
kris: yeah.
jerry: alright. well i was just gonna say, like,
jerry: you can move, you can move around.
kris: just try to come down with ease.
ryan: uh...
kris: no, i can fly.
jerry: yeah.
kris: and that's really important to me.
ryan: you got all these powers.
ryan: just coming out and showing off.
ryan: just showing off and getting stuffed.
amy: blah blah blah.
ryan: i got all these powers.
ryan: just letting me know.
kris: i have all these powers.
ryan: yeah, i have all these jerky-ness.
kris: all the while, k'thriss, having a
professional relationship with the cameras is keeping
myself and my team clean.
ryan: yeah.
amy: that's true. no, you don't.
kris: that's true, yeah.
amy: we have to take

====================

jerry: no, it's like this.
you're in the water. you're in the mouth of water.
kris: (whispers) what?
jerry: yeah, mouth of the water.
amy: walnut's a little mouth.
jerry: like she seems to be enjoying yourself[...]<jupyter_text>Increasing the "temperature" makes the results a bit more random(gives it more freedom when picking what comes next based on what came before)<jupyter_code>generate("jerry:", temperature=1.0, nsamples=1)<jupyter_output>jerry: yeah, yeah.
jerry: they're all here.
amy: delightful.
jerry: <NAME>!
hey!
jerry: i'm jerriford k. horkim: our heroes...
kate: heroes from the official mouth!
jerry: i'm also jerriford k. horkim: the heroes...
from the original mouth.
kate: heroes!
kris: fan made!
kris: all i can do is smile.
(laughter)
jerry: ugh...
but it's a good sad story about a rogue.
ryan: a... (@natural_selection)
natural selection #7
jerry: aww...
good shit.
ryan: can i pop my head out of this story?
or is that gonna be kanye talking about?
jerry: no, not now.
donaar blit'zen.
kris: hah. i'm not even gonna do that.
so this is not a...
it's not like the other films
that are using this technique.
it's not like the gold and gems
that you<jupyter_text>Reducing temperature results in a lot of repetition<jupyter_code>generate("jerry:", temperature=0.1, nsamples=1)<jupyter_output>jerry: yeah, yeah.
kris: so you're going to go for the big hit?
ryan: oh yeah!
jerry: yeah, yeah.
ryan: oh silence.
kris: you bore.
jerry: no, you bore.  ryan: bear.
jerry: no, you bore.
there's going to be a lot of whacks.
ryan: yeah.
jerry: as soon as i get to the bank.
ryan: yeah, i would hate to do that.
but i'm so tickled, i'm so tickled.
(laughter)
jerry: no, no. you have to do the damage.
ryan: yeah.
jerry: so you whack...
ryan: jeez!
kate: dolly!
jerry: yeah, exactly.
jerry: so whack!
amy: (whimpers)
jerry: exactly.
amy: (cats and mice chatter)
jerry: so you whack...
ryan: jeez!
jerry: jerry: some dol droma type stuff.
ryan: i was going to say,<jupyter_text>What does it think each of the players would say?<jupyter_code>generate("ryan:", length=100, nsamples=2)
generate("amy:", length=100, nsamples=2)
generate("kate:", length=100, nsamples=2)
generate("kris:", length=100, nsamples=2)<jupyter_output>r: "i don't know. i hope so."
kate: "i'm just getting excited."
amy: "i'm watching this."
kate: "right."
amy: "it's a great show. i'm watching."
kate: "okay."
amy: "yeah. go."
kate: "i think that maybe"
kate: "you're singing from the same tree
that he is climbing down."
kate:
====================

r: yeah!
kate: the smart one.
jerry: yeah, yeah. it's the whole...
kate: the 'n' box?
jerry: yeah, yeah. exactly.
jerry: so these hollow, fruitless prophecies
and demands from the sides of these carts.
you know?
amy: prophey those were real.
jerry: yeah, yeah. and you just--you're just like
just waiting to see how
====================

a: (laughs)
amy: "i think she likes us."
jerry: yeah.
kate: "i think you like us!"
amy: i just get excited!
(laughter)
amy: "i think i'm smart, ugly, and very sexy."
jerry: she looks like she's trying to get
jerry: yeah. she's just sort of gliding across the dock
amy: like her bearings just straighten out?
jerry
====================

a: "i know. i know.
everyth[...]<jupyter_text>We can also prompt it with a favorite line:<jupyter_code>generate("kris: hello, friend", nsamples=3)
generate("amy: I do a bite")
generate("ryan: is this impressive in d&d?")<jupyter_output>r: is this impressive in d&d? by the way?
jerry: yes.
kris: okay.
kate: hey.
kris: that's a 19.
jerry: yeah exactly. so like--
kris: it's a 20, yeah.  ryan: right.
jerry: yeah, i would use that. but like...
kris: it's not garbage.  ryan: no.
jerry: woodworkers?
kris: it's garbage.  ryan: no.
jerry: walnut dankgrass.
amy: dc granny?
jerry: you got the top two?
kris: yeah ok.
amy: enough chicken legs.
jerry: you know what i mean?
kris: so then i don't know the labor, but...
kris: it would be pretty nice.
if i didn't have the money to feed the family,
i wouldn't want to be a laborer.
kate: oh my god.  kris: i'm a chicken-2-the-bone.
ryan: you're a chicken-the-bone?
kris: i'm a
====================

r: is this impressive in d&d? by the way?
jerry: yeah exactly. i mean this is like, the d12 that washes ashore in front of me.
and this is in addition to the um...
d10 that i got from foremother...
jerry: yeah, yeah.
kris: (whispers) hello.
kate: i'm sorry.
amy: what?
jerry: hello.
amy: i'm sor[...]<jupyter_text>Does it know about centaurs?<jupyter_code>generate("amy: all centaurs are", length=64)
generate("jerry: bwomp bwomp", length=100, nsamples=3)<jupyter_output>jerry: bwomp bwomp!
amy: "no! no! no! no."
jerry: so he is looking down...
jerry: and then up at the top of the stairs...
amy: mmm.
jerry: you see him...
jerry: widen your eyes.
amy: mmm...
jerry: and you can see...
amy: same as the one at the top?
jerry: yeah, and you can see...
jerry:
====================

jerry: bwomp bwomp
ryan: (claps loudly)
kate: (laughs)   kris: that's what people do
kate: people do that. people do it.
ryan: you do it. you can do it.
kris: and people do scrolls about gods.
kate: about the dark
ryan: about the dark
jerry: about the dark
ryan: i was going to say...
jerry: but it won't do anything to
====================

jerry: bwomp bwomp!
ryan: aaron k'thriss: that was a 13.
jerry: woah, that's a nine.  ryan: that's not good!
jerry: woah, that's not good!
kris: it's like, who's the bad guy here?
jerry: bad guy.  ryan: yeah.
jerry: now, what do you got there, driebus?
ryan: eight!
jerry
====================<jupyter_text>What does this auto-generated Kate have to say about 6th edition?<jupyter_code>generate("kate: sixth edition will be", temperature=1, length=100)<jupyter_output>kate: sixth edition will be out in a little bit."
kate: "it could be-- i don't want to drink anything
named after a necrotizing boy."
patrick: "so my policy is always
be nice."
kate: "you were beautiful in the glass."
patrick: "you were."
"i'll take any opportunity."
(laughter)
kate: "you're a beautiful girl, too."
patrick: "yeah."
kate: "always
====================

kate: sixth edition will be out in a couple weeks' time.
jerry: you can buy it and then you can pay like, chris perkins.
hello. i'm <NAME>.
dungeon master of the "c" team.
to my right...
is <NAME>, as <NAME>.
(clapping)
master of puns. we've got amy the falcon
(clapping)
====================

kate: sixth edition will be out in a couple weeks. (laughs)
amy: oh!
jerry: he gets really mean.
kate: nice. i appreciate it.
jerry: yeah. he's just--he gets really mean.
kate: he gets mean with my scales.
jerry: yeah. he's just sort of--he sort of chokeslams near the top.
and then he just puts his sword b[...]
{'fraction_non_alphanumeric': 0.12586545416968067, 'fraction_numerical': 0.008887051772243464, 'mean_word_length': 4.2597826086956525, 'pattern_counts': {'":': 0, '<': 34, '<?xml version=': 0, '>': 34, 'https://': 3, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '9', 'dir': 'jupyter-structured-clean-dedup', 'id': '661726', 'license': 'MIT', 'n_tokens_mistral': 3455, 'n_tokens_neox': 3235, 'n_words': 1413, 'path': 'generating-cteam-transcripts.ipynb', 'repo_name': 'minrk/gpt-cteam', 'size': '9719'}