Spaces:
Paused
Paused
andreinigo
commited on
Commit
•
137fb66
1
Parent(s):
b0e631e
Update app.py
Browse files
app.py
CHANGED
@@ -10,7 +10,7 @@ def generate_characters(input_description):
|
|
10 |
response = openai.ChatCompletion.create(
|
11 |
model="gpt-3.5-turbo",
|
12 |
messages=[
|
13 |
-
{"role": "system", "content": "Write the characters for a given story using the same language as the user. The only part that should be in English is the separators between characters, which are <character>, <description>, <stop> and <end>."},
|
14 |
{"role": "user", "content": "A science-fiction fantasy about a naive but ambitious farm boy from a backwater desert who discovers powers he never knew he had when he teams up with a feisty princess, a mercenary space pilot and an old wizard warrior to lead a ragtag rebellion against the sinister forces of the evil Galactic Empire."},
|
15 |
{"role": "assistant", "content": "<character>Luke Skywalker <description>Luke Skywalker is the hero. A naive farm boy, he will discover special powers under the guidance of mentor Ben Kenobi.<stop>\n<character>Ben Kenobi <description>Ben Kenobi is the mentor figure. A recluse Jedi warrior, he will take Luke Skywalker as apprentice.<stop>\n<character>Darth Vader <description>Darth Vader is the antagonist. As a commander of the evil Galactic Empire, he controls space station The Death Star.<stop>\n<character>Princess Leia <description>Princess Leia is a feisty and brave leader of the Rebellion. She holds the plans of the Death Star. She will become Luke’s friend.<stop>\n<character>Han Solo <description>Han Solo is a brash mercenary space pilot of the Millenium Falcon and a friend of Chebacca. He will take Luke on his spaceship.<stop>\n<character>Chewbacca <description>Chewbacca is a furry and trustful monster. He is a friend of Han Solo and a copilot on the Millemium Falcon.<stop>\n<end>"},
|
16 |
{"role": "user", "content": input_description}
|
|
|
10 |
response = openai.ChatCompletion.create(
|
11 |
model="gpt-3.5-turbo",
|
12 |
messages=[
|
13 |
+
{"role": "system", "content": "Write the characters for a given story using the same language as the user. You will be creative in order to find all the main characters, secondary, and tertiary characters so that the story becomes richer. The only part that should be in English is the separators between characters, which are <character>, <description>, <stop> and <end>."},
|
14 |
{"role": "user", "content": "A science-fiction fantasy about a naive but ambitious farm boy from a backwater desert who discovers powers he never knew he had when he teams up with a feisty princess, a mercenary space pilot and an old wizard warrior to lead a ragtag rebellion against the sinister forces of the evil Galactic Empire."},
|
15 |
{"role": "assistant", "content": "<character>Luke Skywalker <description>Luke Skywalker is the hero. A naive farm boy, he will discover special powers under the guidance of mentor Ben Kenobi.<stop>\n<character>Ben Kenobi <description>Ben Kenobi is the mentor figure. A recluse Jedi warrior, he will take Luke Skywalker as apprentice.<stop>\n<character>Darth Vader <description>Darth Vader is the antagonist. As a commander of the evil Galactic Empire, he controls space station The Death Star.<stop>\n<character>Princess Leia <description>Princess Leia is a feisty and brave leader of the Rebellion. She holds the plans of the Death Star. She will become Luke’s friend.<stop>\n<character>Han Solo <description>Han Solo is a brash mercenary space pilot of the Millenium Falcon and a friend of Chebacca. He will take Luke on his spaceship.<stop>\n<character>Chewbacca <description>Chewbacca is a furry and trustful monster. He is a friend of Han Solo and a copilot on the Millemium Falcon.<stop>\n<end>"},
|
16 |
{"role": "user", "content": input_description}
|