Spaces:
Sleeping
Sleeping
qqubb
commited on
Update compliance_analysis.py
Browse files- compliance_analysis.py +5 -5
compliance_analysis.py
CHANGED
@@ -221,12 +221,12 @@ def run_compliance_analysis_on_data(dispositive_variables, data_cc_yaml):
|
|
221 |
|
222 |
if dispositive_variables['ai_project_type']["high_risk_ai_system"] == True:
|
223 |
for key in data_cc_yaml['high_risk_ai_system_requirements']:
|
224 |
-
if data_cc_yaml['high_risk_ai_system_requirements'][f'{key}']['value'] ==
|
225 |
dispositive_variables['data_cc_non-compliant'][card_label]['msg'].append(f"This high-risk AI system fails the {key} requirements under {data_cc_yaml['high_risk_ai_system_requirements'][f'{key}']['article']}.")
|
226 |
dispositive_variables['project_cc_pass'] = False
|
227 |
if dispositive_variables['ai_project_type']["gpai_model"] == True:
|
228 |
for value in data_cc_yaml['gpai_model_requirements']:
|
229 |
-
if data_cc_yaml['gpai_model_requirements'][f'{value}'] ==
|
230 |
dispositive_variables['data_cc_non-compliant'][card_label]['msg'].append(f"")
|
231 |
|
232 |
return dispositive_variables
|
@@ -241,7 +241,7 @@ def run_compliance_analysis_on_model(dispositive_variables, model_cc_yaml):
|
|
241 |
|
242 |
if dispositive_variables['ai_project_type']["high_risk_ai_system"] == True:
|
243 |
for value in model_cc_yaml['high_risk_ai_system_requirements']:
|
244 |
-
if model_cc_yaml['high_risk_ai_system_requirements'][f'{value}'] ==
|
245 |
dispositive_variables['data_cc_non-compliant'][card_label]['msg'].append(f"This high-risk AI system fails the {key} requirements under {model_cc_yaml['high_risk_ai_system_requirements'][f'{key}']['article']}.")
|
246 |
dispositive_variables['project_cc_pass'] = False
|
247 |
|
@@ -249,7 +249,7 @@ def run_compliance_analysis_on_model(dispositive_variables, model_cc_yaml):
|
|
249 |
|
250 |
if dispositive_variables['ai_project_type']["gpai_model"] == True:
|
251 |
for key in model_cc_yaml['gpai_model_requirements']:
|
252 |
-
if model_cc_yaml['gpai_model_requirements'][f'{key}']['value'] ==
|
253 |
dispositive_variables['data_cc_non-compliant'][card_label]['msg'].append(f"This high-risk AI system fails the {key} requirements under {model_cc_yaml['gpai_model_requirements'][f'{key}']['article']}.")
|
254 |
dispositive_variables['project_cc_pass'] = False
|
255 |
|
@@ -257,7 +257,7 @@ def run_compliance_analysis_on_model(dispositive_variables, model_cc_yaml):
|
|
257 |
|
258 |
if dispositive_variables['ai_project_type']["gpai_model_systemic_risk"] == True:
|
259 |
for key in model_cc_yaml['gpai_model_with_systemic_risk_requirements']:
|
260 |
-
if model_cc_yaml['gpai_model_with_systemic_risk_requirements'][f'{key}']['value'] ==
|
261 |
dispositive_variables['data_cc_non-compliant'][card_label]['msg'].append(f"This high-risk AI system fails the {key} requirements under {model_cc_yaml['gpai_model_with_systemic_risk_requirements'][f'{key}']['article']}.")
|
262 |
dispositive_variables['project_cc_pass'] = False
|
263 |
|
|
|
221 |
|
222 |
if dispositive_variables['ai_project_type']["high_risk_ai_system"] == True:
|
223 |
for key in data_cc_yaml['high_risk_ai_system_requirements']:
|
224 |
+
if data_cc_yaml['high_risk_ai_system_requirements'][f'{key}']['value'] == False:
|
225 |
dispositive_variables['data_cc_non-compliant'][card_label]['msg'].append(f"This high-risk AI system fails the {key} requirements under {data_cc_yaml['high_risk_ai_system_requirements'][f'{key}']['article']}.")
|
226 |
dispositive_variables['project_cc_pass'] = False
|
227 |
if dispositive_variables['ai_project_type']["gpai_model"] == True:
|
228 |
for value in data_cc_yaml['gpai_model_requirements']:
|
229 |
+
if data_cc_yaml['gpai_model_requirements'][f'{value}'] == False:
|
230 |
dispositive_variables['data_cc_non-compliant'][card_label]['msg'].append(f"")
|
231 |
|
232 |
return dispositive_variables
|
|
|
241 |
|
242 |
if dispositive_variables['ai_project_type']["high_risk_ai_system"] == True:
|
243 |
for value in model_cc_yaml['high_risk_ai_system_requirements']:
|
244 |
+
if model_cc_yaml['high_risk_ai_system_requirements'][f'{value}'] == False:
|
245 |
dispositive_variables['data_cc_non-compliant'][card_label]['msg'].append(f"This high-risk AI system fails the {key} requirements under {model_cc_yaml['high_risk_ai_system_requirements'][f'{key}']['article']}.")
|
246 |
dispositive_variables['project_cc_pass'] = False
|
247 |
|
|
|
249 |
|
250 |
if dispositive_variables['ai_project_type']["gpai_model"] == True:
|
251 |
for key in model_cc_yaml['gpai_model_requirements']:
|
252 |
+
if model_cc_yaml['gpai_model_requirements'][f'{key}']['value'] == False:
|
253 |
dispositive_variables['data_cc_non-compliant'][card_label]['msg'].append(f"This high-risk AI system fails the {key} requirements under {model_cc_yaml['gpai_model_requirements'][f'{key}']['article']}.")
|
254 |
dispositive_variables['project_cc_pass'] = False
|
255 |
|
|
|
257 |
|
258 |
if dispositive_variables['ai_project_type']["gpai_model_systemic_risk"] == True:
|
259 |
for key in model_cc_yaml['gpai_model_with_systemic_risk_requirements']:
|
260 |
+
if model_cc_yaml['gpai_model_with_systemic_risk_requirements'][f'{key}']['value'] == False:
|
261 |
dispositive_variables['data_cc_non-compliant'][card_label]['msg'].append(f"This high-risk AI system fails the {key} requirements under {model_cc_yaml['gpai_model_with_systemic_risk_requirements'][f'{key}']['article']}.")
|
262 |
dispositive_variables['project_cc_pass'] = False
|
263 |
|