Spaces:
Running
on
Zero
Running
on
Zero
kwabs22
commited on
Commit
·
f658ac0
1
Parent(s):
f09bd3c
Refactor Proto Assist accordion to absorb mess
Browse files
app.py
CHANGED
@@ -354,12 +354,12 @@ def show_elements_json_input(json_input):
|
|
354 |
print(locations)
|
355 |
for i, location in enumerate(locations):
|
356 |
updated_data["masterlocation1"][location] = {
|
357 |
-
"description": current_values[i*
|
358 |
-
"events": json.loads(current_values[i*
|
359 |
-
"choices": json.loads(current_values[i*
|
360 |
-
"transitions": json.loads(current_values[i*
|
361 |
-
"media": json.loads(current_values[i*
|
362 |
-
"developernotes": json.loads(current_values[i*
|
363 |
}
|
364 |
updated_data["masterlocation1"]["end"] = masterlocation1["end"]
|
365 |
return json.dumps(updated_data, indent=2)
|
|
|
354 |
print(locations)
|
355 |
for i, location in enumerate(locations):
|
356 |
updated_data["masterlocation1"][location] = {
|
357 |
+
"description": current_values[i*6],
|
358 |
+
"events": json.loads(current_values[i*6 + 1]),
|
359 |
+
"choices": json.loads(current_values[i*6 + 2]),
|
360 |
+
"transitions": json.loads(current_values[i*6 + 3]),
|
361 |
+
"media": json.loads(current_values[i*6 + 4]), # New media field
|
362 |
+
"developernotes": json.loads(current_values[i*6 + 5])
|
363 |
}
|
364 |
updated_data["masterlocation1"]["end"] = masterlocation1["end"]
|
365 |
return json.dumps(updated_data, indent=2)
|