Java library for the GPT-2 Text Model using Tensorflow
Source:
More Background:
<dependency>
<groupId>com.simiacryptus</groupId>
<artifactId>tf-gpt-2</artifactId>
<version>1.7.1</version>
</dependency>
import com.simiacryptus.text.TextGenerator;
import com.simiacryptus.text.gpt2.GPT2Util;
TextGenerator textGenerator = GPT2Util.get345M();
System.out.println(textGenerator.generateText(500));
System.out.println(textGenerator.generateText(500, "Once upon a time"));