Initial commit

This commit is contained in:
Eduardo Cueto Mendoza 2020-08-05 12:36:50 -06:00
commit f30a0b2be3
3 changed files with 2121 additions and 0 deletions

3
.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
checkpoint/*
models/*
.DS_Store

File diff suppressed because it is too large Load Diff

14
gen-test.py Normal file
View File

@ -0,0 +1,14 @@
from gpt2_client import GPT2Client
gpt2 = GPT2Client('345M')
gpt2.load_model(force_download=False)
#gpt2.generate(interactive=True) # Asks user for prompt
#gpt2.generate(n_samples=4) # Generates 4 pieces of text
#text = gpt2.generate(return_text=True) # Generates text and returns it in an array
#gpt2.generate(interactive=True, n_samples=1, return_text=True) # A different prompt each time
my_corpus = "./Corpus/Neural_Ordinary_Differential_Equations.txt"
custom_text = gpt2.finetune(my_corpus, return_text=False)
#print(custom_text)