From 9d53d8857eaa1c9405894a88ca75bc4657e42f35 Mon Sep 17 00:00:00 2001 From: msglm Date: Sat, 14 Jan 2023 05:31:48 -0600 Subject: Inital Commit --- HTML/Final/sneed/purchase/textgen.py | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100755 HTML/Final/sneed/purchase/textgen.py (limited to 'HTML/Final/sneed/purchase/textgen.py') diff --git a/HTML/Final/sneed/purchase/textgen.py b/HTML/Final/sneed/purchase/textgen.py new file mode 100755 index 0000000..3290116 --- /dev/null +++ b/HTML/Final/sneed/purchase/textgen.py @@ -0,0 +1,10 @@ +#!/usr/bin/python3 +from aitextgen import aitextgen +import sys + +#ai = aitextgen(model_folder="/home/msglm/Documents/ComputerScience/Projects/GPT-2/RedpillGenerator/aitextgen/") +#ai = aitextgen(model="distilgpt2", cache_dir="/home/msglm/.local/share/aitextgen-models") +ai = aitextgen(tf_gpt2="774M", cache_dir="/home/msglm/.local/share/aitextgen-models") +ai.to_gpu() +output = ai.generate_one(max_length=int(sys.argv[1]), prompt=sys.argv[2], temperature=0.7) +print(output) -- cgit v1.2.3