Spaces:
Runtime error
Runtime error
Sebastian Gehrmann
commited on
Commit
·
75a8362
1
Parent(s):
53cf224
formatting/reformat_json.py
CHANGED
@@ -90,6 +90,9 @@ def construct_json(dataset_name: str, data_card_data: dict, text_by_key: dict):
|
|
90 |
for second_key, second_content in main_content.items():
|
91 |
if second_key == "section-title":
|
92 |
continue
|
|
|
|
|
|
|
93 |
l3_data = {
|
94 |
"title": second_content["section-title"],
|
95 |
"level": 3,
|
@@ -98,8 +101,6 @@ def construct_json(dataset_name: str, data_card_data: dict, text_by_key: dict):
|
|
98 |
for final_key, final_content in second_content.items():
|
99 |
if final_key == "section-title":
|
100 |
continue
|
101 |
-
if final_key == "dataset" and second_key == "what" and main_key == "dataset":
|
102 |
-
continue
|
103 |
try:
|
104 |
total_questions += 1
|
105 |
answer = data_card_data[main_key][second_key].get(final_key, "N/A")
|
|
|
90 |
for second_key, second_content in main_content.items():
|
91 |
if second_key == "section-title":
|
92 |
continue
|
93 |
+
# Skip summary data since it is already in the header.
|
94 |
+
if main_key == "overview" and second_key == "what":
|
95 |
+
continue
|
96 |
l3_data = {
|
97 |
"title": second_content["section-title"],
|
98 |
"level": 3,
|
|
|
101 |
for final_key, final_content in second_content.items():
|
102 |
if final_key == "section-title":
|
103 |
continue
|
|
|
|
|
104 |
try:
|
105 |
total_questions += 1
|
106 |
answer = data_card_data[main_key][second_key].get(final_key, "N/A")
|