Spaces:
Sleeping
Sleeping
Update function.py
Browse files- function.py +1 -1
function.py
CHANGED
@@ -27,7 +27,7 @@ def text2story(text):
|
|
27 |
model = AutoModelForCausalLM.from_pretrained("openai-community/gpt2")
|
28 |
|
29 |
prompt = (
|
30 |
-
f"Please write a short, imaginative story based on the following idea (no more than
|
31 |
f"{text}\n\nStory:"
|
32 |
)
|
33 |
inputs = tokenizer(prompt, return_tensors="pt")
|
|
|
27 |
model = AutoModelForCausalLM.from_pretrained("openai-community/gpt2")
|
28 |
|
29 |
prompt = (
|
30 |
+
f"Please write a short, imaginative story based on the following idea (no more than 10 words):\n\n"
|
31 |
f"{text}\n\nStory:"
|
32 |
)
|
33 |
inputs = tokenizer(prompt, return_tensors="pt")
|