Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -196,6 +196,10 @@ with col2:
|
|
196 |
import re
|
197 |
import json
|
198 |
|
|
|
|
|
|
|
|
|
199 |
# Intentar detectar y limpiar formato JSON
|
200 |
if '{' in perfil_cliente and '}' in perfil_cliente:
|
201 |
# Intentar extraer solo el contenido textual, eliminando estructuras JSON
|
|
|
196 |
import re
|
197 |
import json
|
198 |
|
199 |
+
# Eliminar marcadores de c贸digo markdown como ```json, ```python, etc.
|
200 |
+
perfil_cliente = re.sub(r'```[a-z]*\n', '', perfil_cliente)
|
201 |
+
perfil_cliente = re.sub(r'```', '', perfil_cliente)
|
202 |
+
|
203 |
# Intentar detectar y limpiar formato JSON
|
204 |
if '{' in perfil_cliente and '}' in perfil_cliente:
|
205 |
# Intentar extraer solo el contenido textual, eliminando estructuras JSON
|