Update app.py
Browse files
app.py
CHANGED
|
@@ -20,7 +20,7 @@ def text2story(text):
|
|
| 20 |
#messages = f"""Generate a story of about 100 words using the following sentences: {text}."""
|
| 21 |
messages = [
|
| 22 |
{"role": "system", "content": "You are Qwen, created by Alibaba Cloud. You are a helpful assistant."},
|
| 23 |
-
{"role": "user", "content": f"""Please help generate a vivid story in
|
| 24 |
]
|
| 25 |
text_to_story_model= pipeline("text-generation", model="Qwen/Qwen2.5-0.5B-Instruct")
|
| 26 |
story_text = text_to_story_model(
|
|
|
|
| 20 |
#messages = f"""Generate a story of about 100 words using the following sentences: {text}."""
|
| 21 |
messages = [
|
| 22 |
{"role": "system", "content": "You are Qwen, created by Alibaba Cloud. You are a helpful assistant."},
|
| 23 |
+
{"role": "user", "content": f"""Please help generate a vivid story in 200 words using the following sentences: "{text}".The story must contain:Beginning, middle, end and use descriptive language"""},
|
| 24 |
]
|
| 25 |
text_to_story_model= pipeline("text-generation", model="Qwen/Qwen2.5-0.5B-Instruct")
|
| 26 |
story_text = text_to_story_model(
|