summaryrefslogtreecommitdiffstats
path: root/HTML/Final/sneed/purchase/textgen.py
diff options
context:
space:
mode:
Diffstat (limited to 'HTML/Final/sneed/purchase/textgen.py')
-rwxr-xr-xHTML/Final/sneed/purchase/textgen.py10
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)