Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -293,16 +293,9 @@ def simple_chat(message, temperature: float = 0.8, max_length: int = 4096, top_p
|
|
| 293 |
return PlainTextResponse(formatted_text)
|
| 294 |
|
| 295 |
def format_json_to_text(json_content):
|
| 296 |
-
"""
|
| 297 |
-
Formatea un diccionario JSON a texto plano sin comillas alrededor de los valores.
|
| 298 |
-
"""
|
| 299 |
formatted_lines = []
|
| 300 |
for key, value in json_content.items():
|
| 301 |
-
|
| 302 |
-
if isinstance(value, str) and (',' in value or '.' in value):
|
| 303 |
-
formatted_lines.append(f"{key}: {value}")
|
| 304 |
-
else:
|
| 305 |
-
formatted_lines.append(f"{key}: {value}")
|
| 306 |
return "\n".join(formatted_lines)
|
| 307 |
|
| 308 |
|
|
|
|
| 293 |
return PlainTextResponse(formatted_text)
|
| 294 |
|
| 295 |
def format_json_to_text(json_content):
|
|
|
|
|
|
|
|
|
|
| 296 |
formatted_lines = []
|
| 297 |
for key, value in json_content.items():
|
| 298 |
+
formatted_lines.append(f"{key}: {value}")
|
|
|
|
|
|
|
|
|
|
|
|
|
| 299 |
return "\n".join(formatted_lines)
|
| 300 |
|
| 301 |
|