Spaces:
Sleeping
Sleeping
Update utils/mistral.py
Browse files- utils/mistral.py +1 -1
utils/mistral.py
CHANGED
@@ -52,7 +52,7 @@ def Data_Cleaner(text):
|
|
52 |
# Validate and return the cleaned JSON if it's valid
|
53 |
try:
|
54 |
json_obj = json.loads(json_str) # Validate JSON
|
55 |
-
return
|
56 |
except json.JSONDecodeError:
|
57 |
logging.error("Extracted text is not valid JSON")
|
58 |
return text # Return the original text if JSON decoding fails
|
|
|
52 |
# Validate and return the cleaned JSON if it's valid
|
53 |
try:
|
54 |
json_obj = json.loads(json_str) # Validate JSON
|
55 |
+
return json_str # Return the parsed JSON as a string
|
56 |
except json.JSONDecodeError:
|
57 |
logging.error("Extracted text is not valid JSON")
|
58 |
return text # Return the original text if JSON decoding fails
|