-
Notifications
You must be signed in to change notification settings - Fork 1
/
responses.py
25 lines (17 loc) · 858 Bytes
/
responses.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
from gpt2_bot import generate_samples
def trump(command):
"""Uses GPT-2 model trained on Trump speeches to generate text sample"""
command = command.split("trump")[1]
return generate_samples("trump", sample_len=100, prime_text=command)
def okcupid(command):
"""Uses GPT-2 model trained on okcupid dating profiles to generate text sample"""
command = command.split("okcupid")[1]
return generate_samples("okcupid", sample_len=100, prime_text=command)
def rap(command):
"""Uses GPT-2 model trained on rap lyrics to generate text sample"""
command = command.split("rap")[1]
return generate_samples("rap", prime_text=command)
def ruby(command):
"""Uses GPT-2 model trained on ruby source code to generate text sample"""
command = command.split("ruby")[1]
return generate_samples("ruby", prime_text=command)