Spaces:
Sleeping
Sleeping
Update utils/story_generator.py
Browse files- utils/story_generator.py +7 -3
utils/story_generator.py
CHANGED
|
@@ -36,9 +36,13 @@ class StoryGenerator:
|
|
| 36 |
historia=params.get("historia", "")
|
| 37 |
)
|
| 38 |
|
| 39 |
-
# Add
|
| 40 |
-
|
| 41 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 42 |
|
| 43 |
# Add tone-specific instructions
|
| 44 |
tone_instructions = ToneInstructions.get_tone_instructions(params.get("tone", "Profesional"))
|
|
|
|
| 36 |
historia=params.get("historia", "")
|
| 37 |
)
|
| 38 |
|
| 39 |
+
# Add examples from STORY_FORMULAS to inspire the story
|
| 40 |
+
examples = STORY_FORMULAS[formula]["examples"]
|
| 41 |
+
if examples:
|
| 42 |
+
prompt += "\n\nINSPIRACIÓN:\n"
|
| 43 |
+
# Limitar el número de ejemplos a 2 o 3 para inspirar la historia
|
| 44 |
+
for example in examples[:3]: # Cambia el número aquí si deseas más o menos ejemplos
|
| 45 |
+
prompt += f"- {example['story']}\n"
|
| 46 |
|
| 47 |
# Add tone-specific instructions
|
| 48 |
tone_instructions = ToneInstructions.get_tone_instructions(params.get("tone", "Profesional"))
|