Spaces:
Runtime error
Runtime error
Commit
·
1d6320a
1
Parent(s):
ffc99a4
Update prompt
Browse files
app.py
CHANGED
@@ -9,8 +9,10 @@ from happytransformer import GENSettings
|
|
9 |
def generate(text, length=100, penalty=3, temperature=0.8):
|
10 |
args_top_k = GENSettings(no_repeat_ngram_size=penalty, do_sample=True, top_k=80, temperature=temperature, max_length=length, early_stopping=False)
|
11 |
|
12 |
-
inputText = "Write a greentext from 4chan.org. The story should be like a bullet-point list using > as the start of each line.
|
13 |
inputText += ">" + text + "\n>"
|
|
|
|
|
14 |
|
15 |
result = happy_gen.generate_text(inputText, args=args_top_k)
|
16 |
generated_text = result.text #returns generated text only
|
|
|
9 |
def generate(text, length=100, penalty=3, temperature=0.8):
|
10 |
args_top_k = GENSettings(no_repeat_ngram_size=penalty, do_sample=True, top_k=80, temperature=temperature, max_length=length, early_stopping=False)
|
11 |
|
12 |
+
inputText = "Write a greentext from 4chan.org. The story should be like a bullet-point list using > as the start of each line. It must be funny and have a twist near the end.\n"
|
13 |
inputText += ">" + text + "\n>"
|
14 |
+
|
15 |
+
print(inputText)
|
16 |
|
17 |
result = happy_gen.generate_text(inputText, args=args_top_k)
|
18 |
generated_text = result.text #returns generated text only
|