Spaces:
Runtime error
Runtime error
Yacine Jernite
commited on
Commit
•
ead9ac7
1
Parent(s):
cc73923
other licenses
Browse files- datacards/considerations.py +16 -1
- datacards/context.py +1 -1
datacards/considerations.py
CHANGED
@@ -48,9 +48,17 @@ def considerations_page():
|
|
48 |
"do not distribute",
|
49 |
"other",
|
50 |
],
|
51 |
-
key_list=key_pref + ["
|
52 |
help="Does the license restrict how the dataset can be used?",
|
53 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
54 |
make_multiselect(
|
55 |
label="Based on your answers in the Language part of the Data Curation Section, which of the following best describe the copyright and licensing status of the underlying language data?",
|
56 |
options=[
|
@@ -66,6 +74,13 @@ def considerations_page():
|
|
66 |
key_list=key_pref + ["data-copyright"],
|
67 |
help="For example if the dataset uses data from Wikipedia, we are asking about the status of Wikipedia text in general.",
|
68 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
69 |
|
70 |
with st.expander("Known Technical Limitations", expanded=False):
|
71 |
key_pref = ["considerations", "limitations"]
|
|
|
48 |
"do not distribute",
|
49 |
"other",
|
50 |
],
|
51 |
+
key_list=key_pref + ["dataset-restrictions"],
|
52 |
help="Does the license restrict how the dataset can be used?",
|
53 |
)
|
54 |
+
if "other" in st.session_state.card_dict["considerations"]["licenses"].get("dataset-restrictions", []):
|
55 |
+
make_text_area(
|
56 |
+
label="You selected `other` for the dataset licensing status, please elaborate here:",
|
57 |
+
key_list=key_pref+["dataset-restrictions-other"]
|
58 |
+
)
|
59 |
+
else:
|
60 |
+
st.session_state.card_dict["considerations"]["licenses"]["dataset-restrictions-other"] = "N/A"
|
61 |
+
|
62 |
make_multiselect(
|
63 |
label="Based on your answers in the Language part of the Data Curation Section, which of the following best describe the copyright and licensing status of the underlying language data?",
|
64 |
options=[
|
|
|
74 |
key_list=key_pref + ["data-copyright"],
|
75 |
help="For example if the dataset uses data from Wikipedia, we are asking about the status of Wikipedia text in general.",
|
76 |
)
|
77 |
+
if "other" in st.session_state.card_dict["considerations"]["licenses"].get("data-copyright", []):
|
78 |
+
make_text_area(
|
79 |
+
label="You selected `other` for the source data licensing status, please elaborate here:",
|
80 |
+
key_list=key_pref+["data-copyright-other"]
|
81 |
+
)
|
82 |
+
else:
|
83 |
+
st.session_state.card_dict["considerations"]["licenses"]["data-copyright-other"] = "N/A"
|
84 |
|
85 |
with st.expander("Known Technical Limitations", expanded=False):
|
86 |
key_pref = ["considerations", "limitations"]
|
datacards/context.py
CHANGED
@@ -106,7 +106,7 @@ def context_summary():
|
|
106 |
completion_markdown += (
|
107 |
f"- **Overall completion:**\n - {total_filled} of {N_FIELDS} fields\n"
|
108 |
)
|
109 |
-
completion_markdown += f"- **Sub-section - Social Impact of the Dataset:**\n - {len(st.session_state.card_dict.get('context', {}).get('previous', {}))} of {N_FIELDS_PREVIOUS} fields\n"
|
110 |
completion_markdown += f"- **Sub-section - Impact on Under-Served Communities:**\n - {len(st.session_state.card_dict.get('context', {}).get('underserved', {}))} of {N_FIELDS_UNDERSERVED_COMMUNITIES} fields\n"
|
111 |
completion_markdown += f"- **Sub-section - Discussion of Biases:**\n - {len(st.session_state.card_dict.get('context', {}).get('biases', {}))} of {N_FIELDS_BIASES} fields\n"
|
112 |
st.markdown(completion_markdown)
|
|
|
106 |
completion_markdown += (
|
107 |
f"- **Overall completion:**\n - {total_filled} of {N_FIELDS} fields\n"
|
108 |
)
|
109 |
+
completion_markdown += f"- **Sub-section - Previous Work on the Social Impact of the Dataset:**\n - {len(st.session_state.card_dict.get('context', {}).get('previous', {}))} of {N_FIELDS_PREVIOUS} fields\n"
|
110 |
completion_markdown += f"- **Sub-section - Impact on Under-Served Communities:**\n - {len(st.session_state.card_dict.get('context', {}).get('underserved', {}))} of {N_FIELDS_UNDERSERVED_COMMUNITIES} fields\n"
|
111 |
completion_markdown += f"- **Sub-section - Discussion of Biases:**\n - {len(st.session_state.card_dict.get('context', {}).get('biases', {}))} of {N_FIELDS_BIASES} fields\n"
|
112 |
st.markdown(completion_markdown)
|