Spaces:
Sleeping
Sleeping
qqubb
commited on
Commit
·
0c7583a
1
Parent(s):
05104d0
add .gitignore
Browse files- .gitignore +2 -0
- utils.py +18 -15
.gitignore
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
1 |
+
__pycache__
|
2 |
+
compliancecards.code-workspace
|
utils.py
CHANGED
@@ -76,21 +76,24 @@ def check_excepted(project_cc_yaml):
|
|
76 |
else:
|
77 |
return False
|
78 |
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
|
|
|
|
|
|
94 |
|
95 |
# def check_all_true(file_path):
|
96 |
# data = yaml.safe_load(file_path)
|
|
|
76 |
else:
|
77 |
return False
|
78 |
|
79 |
+
def check_prohibited (project_variables, project_cc_yaml):
|
80 |
+
|
81 |
+
ai_system = project_variables['ai_project_type']['ai_system']
|
82 |
+
|
83 |
+
if ai_system:
|
84 |
+
for key in project_cc_yaml['prohibited_practice']['ai_system']:
|
85 |
+
if key[value]:
|
86 |
+
print("You are engaged in a prohibited practice and thus the project is non-compliant.")
|
87 |
+
return True
|
88 |
+
if project_cc_yaml['prohibited_practice']['biometric']['categorization']:
|
89 |
+
print("You are engaged in a prohibited practice and thus the project is non-compliant.")
|
90 |
+
return True
|
91 |
+
if project_cc_yaml['prohibited_practice']['biometric']['real_time'] and sum(map(bool, [project_cc_yaml['prohibited_practice']['biometric']['real_time_exception_victim'],project_cc['prohibited_practice']['biometric']['real_time_exception_threat'], project_cc_yaml['prohibited_practice']['biometric']['real_time_exception_investigation']])) == 0:
|
92 |
+
print("You are engaged in a prohibited practice and thus the project is non-compliant.")
|
93 |
+
return True
|
94 |
+
else:
|
95 |
+
print("You are not engaged in any prohibited practices.")
|
96 |
+
return False
|
97 |
|
98 |
# def check_all_true(file_path):
|
99 |
# data = yaml.safe_load(file_path)
|