Update app.py
Browse files
app.py
CHANGED
@@ -85,18 +85,16 @@ def generate_story(comments, temperature=0.7):
|
|
85 |
completion = client.chat.completions.create(
|
86 |
model="gpt-4o",
|
87 |
messages=[{"role": "system", "content": f"""
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
and create a story in first person (the person can be randomly young or old and the story can be
|
92 |
-
based in past or future) based on that emotion picking a random character keep the words
|
93 |
simple and a bit profound but overall simple words. Give more weight to the comments that
|
94 |
-
come earlier in sequence. The
|
95 |
-
Don't mention the comments or emotions. just return the story"""},
|
96 |
{"role": "assistant", "content": """
|
97 |
-
|
98 |
-
|
99 |
-
|
|
|
100 |
,temperature=temperature)
|
101 |
return completion.choices[0].message.content
|
102 |
|
|
|
85 |
completion = client.chat.completions.create(
|
86 |
model="gpt-4o",
|
87 |
messages=[{"role": "system", "content": f"""
|
88 |
+
|
89 |
+
Read all the comments, understand the emotions people are feeling and pick any random emotion
|
90 |
+
and create a story in first person based on that emotion picking a random character keep the words
|
|
|
|
|
91 |
simple and a bit profound but overall simple words. Give more weight to the comments that
|
92 |
+
come earlier in sequence. The comments are given here: {comments_text}"""},
|
|
|
93 |
{"role": "assistant", "content": """
|
94 |
+
ignore the comment which has lyrics of the song,
|
95 |
+
ignore all comments similar to 'anyone in 2024', Keep the story randomly between 50-120 words.
|
96 |
+
dont mention the emtion chosen just start the story.
|
97 |
+
sometimes include bits where you tell how this song makes you feel. half the times end the story with a hopeful future or a dark end or humorous."""}]
|
98 |
,temperature=temperature)
|
99 |
return completion.choices[0].message.content
|
100 |
|