Redmind commited on
Commit
a3682f0
·
verified ·
1 Parent(s): c3b46b1

Update chat.py

Browse files
Files changed (1) hide show
  1. chat.py +5 -5
chat.py CHANGED
@@ -341,11 +341,11 @@ def unstructured_text_to_df(text):
341
  # Try to parse the response as JSON
342
  try:
343
  # Find the JSON-like section and load it
344
- start_index = response_content.find("{")
345
- json_part = response_content[start_index:] # Extract starting from the first '{'
346
- structured_data = json.loads(json_part) # Parse the JSON part
347
-
348
- print("Parsed JSON:", structured_data)
349
  except (json.JSONDecodeError, ValueError) as e:
350
  print(f"Error: {e}")
351
 
 
341
  # Try to parse the response as JSON
342
  try:
343
  # Find the JSON-like section and load it
344
+ start_index = response_content.find("{")
345
+ json_part = response_content[start_index:] # Extract starting from the first '{'
346
+ structured_data = json.loads(json_part) # Parse the JSON part
347
+
348
+ print("Parsed JSON:", structured_data)
349
  except (json.JSONDecodeError, ValueError) as e:
350
  print(f"Error: {e}")
351