Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -97,13 +97,13 @@ class PromptRefiner:
|
|
97 |
|
98 |
if isinstance(json_output, str):
|
99 |
json_output = json.loads(json_output)
|
100 |
-
|
101 |
-
# Clean up JSON values
|
102 |
-
return {
|
103 |
key: value.replace('\\"', '"') if isinstance(value, str) else value
|
104 |
for key, value in json_output.items(),
|
105 |
-
'response_content':json_output
|
106 |
}
|
|
|
|
|
|
|
107 |
|
108 |
# Fallback to regex parsing if no JSON found
|
109 |
output = {}
|
|
|
97 |
|
98 |
if isinstance(json_output, str):
|
99 |
json_output = json.loads(json_output)
|
100 |
+
output={
|
|
|
|
|
101 |
key: value.replace('\\"', '"') if isinstance(value, str) else value
|
102 |
for key, value in json_output.items(),
|
|
|
103 |
}
|
104 |
+
output['response_content']=json_output
|
105 |
+
# Clean up JSON values
|
106 |
+
return output
|
107 |
|
108 |
# Fallback to regex parsing if no JSON found
|
109 |
output = {}
|