diff options
author | msglm <msglm@techchud.xyz> | 2023-01-14 05:31:48 -0600 |
---|---|---|
committer | msglm <msglm@techchud.xyz> | 2023-01-14 05:31:48 -0600 |
commit | 9d53d8857eaa1c9405894a88ca75bc4657e42f35 (patch) | |
tree | eb1efc1d028b949dd83bb710c68be8eff58f26e7 /HTML/Final/sneed/purchase/textgen.py | |
download | school-code-master.tar.gz school-code-master.tar.bz2 school-code-master.zip |
Diffstat (limited to 'HTML/Final/sneed/purchase/textgen.py')
-rwxr-xr-x | HTML/Final/sneed/purchase/textgen.py | 10 |
1 files changed, 10 insertions, 0 deletions
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) |