Spaces:
Sleeping
Sleeping
Update sophistication/generator.py
Browse files
sophistication/generator.py
CHANGED
|
@@ -16,6 +16,10 @@ def create_sophistication_instruction(sophistication_key):
|
|
| 16 |
if not level_data:
|
| 17 |
return ""
|
| 18 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
# Create the instruction text using the level data
|
| 20 |
instruction = f"""NIVEL DE SOFISTICACIÓN DEL MERCADO:
|
| 21 |
{level_data.get('description', '')}
|
|
@@ -24,7 +28,7 @@ Estrategia recomendada:
|
|
| 24 |
{level_data.get('strategy', '')}
|
| 25 |
|
| 26 |
Características de este nivel:
|
| 27 |
-
- {
|
| 28 |
|
| 29 |
Ejemplo de gancho para este nivel:
|
| 30 |
"{level_data.get('example', '')}"
|
|
|
|
| 16 |
if not level_data:
|
| 17 |
return ""
|
| 18 |
|
| 19 |
+
# Format the characteristics list outside the f-string
|
| 20 |
+
characteristics = level_data.get('characteristics', [])
|
| 21 |
+
characteristics_text = '\n- '.join(characteristics)
|
| 22 |
+
|
| 23 |
# Create the instruction text using the level data
|
| 24 |
instruction = f"""NIVEL DE SOFISTICACIÓN DEL MERCADO:
|
| 25 |
{level_data.get('description', '')}
|
|
|
|
| 28 |
{level_data.get('strategy', '')}
|
| 29 |
|
| 30 |
Características de este nivel:
|
| 31 |
+
- {characteristics_text}
|
| 32 |
|
| 33 |
Ejemplo de gancho para este nivel:
|
| 34 |
"{level_data.get('example', '')}"
|