Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -53,7 +53,7 @@ def parse_outputs(data):
|
|
53 |
# Handle case where data is an object
|
54 |
dict_values = []
|
55 |
for value in data.values():
|
56 |
-
extracted_values =
|
57 |
# For dict, we append instead of extend to maintain list structure within objects
|
58 |
if isinstance(value, list):
|
59 |
dict_values += [extracted_values]
|
@@ -65,7 +65,7 @@ def parse_outputs(data):
|
|
65 |
list_values = []
|
66 |
for item in data:
|
67 |
# Here we extend to flatten the list since we're already in an array context
|
68 |
-
list_values +=
|
69 |
return list_values
|
70 |
else:
|
71 |
# Handle primitive data types directly
|
|
|
53 |
# Handle case where data is an object
|
54 |
dict_values = []
|
55 |
for value in data.values():
|
56 |
+
extracted_values = parse_outputs(value)
|
57 |
# For dict, we append instead of extend to maintain list structure within objects
|
58 |
if isinstance(value, list):
|
59 |
dict_values += [extracted_values]
|
|
|
65 |
list_values = []
|
66 |
for item in data:
|
67 |
# Here we extend to flatten the list since we're already in an array context
|
68 |
+
list_values += parse_outputs(item)
|
69 |
return list_values
|
70 |
else:
|
71 |
# Handle primitive data types directly
|