Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -273,14 +273,8 @@ def simple_chat(message, temperature: float = 0.8, max_length: int = 4096, top_p
|
|
273 |
|
274 |
thread.join()
|
275 |
|
276 |
-
# try:
|
277 |
-
# json_content = json.loads(buffer)
|
278 |
-
# formatted_text = "\n".join(f"{key}: {value}" for key, value in json_content.items())
|
279 |
-
# except json.JSONDecodeError:
|
280 |
-
# formatted_text = buffer
|
281 |
-
|
282 |
try:
|
283 |
-
buffer = buffer.strip()
|
284 |
buffer = buffer.strip('`')
|
285 |
buffer = buffer.strip('json')
|
286 |
json_content = json.loads(buffer)
|
|
|
273 |
|
274 |
thread.join()
|
275 |
|
|
|
|
|
|
|
|
|
|
|
|
|
276 |
try:
|
277 |
+
#buffer = buffer.strip()
|
278 |
buffer = buffer.strip('`')
|
279 |
buffer = buffer.strip('json')
|
280 |
json_content = json.loads(buffer)
|