Spaces:
Sleeping
Sleeping
qqubb
commited on
Commit
·
5be1f85
1
Parent(s):
cfd40e9
improve code in set_eu_market_status
Browse files- compliance_analysis.py +11 -11
- project_cc.yaml +2 -1
compliance_analysis.py
CHANGED
@@ -66,7 +66,7 @@ def run_compliance_analysis(folder_path):
|
|
66 |
# Determine project type (AI system vs. GPAI model) as well as operator type. We will use these for different things.
|
67 |
set_type(project_variables, project_cc_yaml)
|
68 |
set_operator_role_and_location(project_variables, project_cc_yaml)
|
69 |
-
set_eu_market_status(project_cc_yaml)
|
70 |
|
71 |
# Check if the project is within scope of the Act. If it's not, the analysis is over.
|
72 |
if check_within_scope(project_cc_yaml):
|
@@ -260,13 +260,17 @@ def set_operator_role_and_location(project_variables, project_cc_yaml):
|
|
260 |
|
261 |
return project_variables
|
262 |
|
263 |
-
def set_eu_market_status(project_cc_yaml):
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
|
|
|
|
268 |
if project_cc_yaml['operator_role']['output_used']['value']:
|
269 |
-
output_used
|
|
|
|
|
270 |
|
271 |
def check_within_scope(project_cc):
|
272 |
if not check_excepted(project_cc):
|
@@ -305,10 +309,6 @@ def check_prohibited (project_cc_yaml):
|
|
305 |
print("You are not engaged in any prohibited practices.")
|
306 |
return False
|
307 |
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
def check_all_true(file_path):
|
313 |
# Load the YAML file
|
314 |
with open("./project_cc.yaml", 'r') as file:
|
|
|
66 |
# Determine project type (AI system vs. GPAI model) as well as operator type. We will use these for different things.
|
67 |
set_type(project_variables, project_cc_yaml)
|
68 |
set_operator_role_and_location(project_variables, project_cc_yaml)
|
69 |
+
set_eu_market_status(project_variables, project_cc_yaml)
|
70 |
|
71 |
# Check if the project is within scope of the Act. If it's not, the analysis is over.
|
72 |
if check_within_scope(project_cc_yaml):
|
|
|
260 |
|
261 |
return project_variables
|
262 |
|
263 |
+
def set_eu_market_status(project_variables, project_cc_yaml):
|
264 |
+
|
265 |
+
if project_cc_yaml['eu_market_status']['placed_on_market']['value']:
|
266 |
+
project_variables['eu_market_status']["placed_on_market"] = True
|
267 |
+
if project_cc_yaml['eu_market_status']['put_into_service']['value']:
|
268 |
+
project_variables['eu_market_status']["put_into_service"] = True
|
269 |
+
|
270 |
if project_cc_yaml['operator_role']['output_used']['value']:
|
271 |
+
project_variables['operator_role']["output_used"] = True
|
272 |
+
|
273 |
+
return project_variables
|
274 |
|
275 |
def check_within_scope(project_cc):
|
276 |
if not check_excepted(project_cc):
|
|
|
309 |
print("You are not engaged in any prohibited practices.")
|
310 |
return False
|
311 |
|
|
|
|
|
|
|
|
|
312 |
def check_all_true(file_path):
|
313 |
# Load the YAML file
|
314 |
with open("./project_cc.yaml", 'r') as file:
|
project_cc.yaml
CHANGED
@@ -3,12 +3,13 @@ smb:
|
|
3 |
verbose: 'AI project is operated by a small or medium-sized enterprise'
|
4 |
value: !!bool false
|
5 |
|
6 |
-
|
7 |
placed_on_market: # Art. 3(9)
|
8 |
verbose: 'AI project is being made available on the Union market for the first time'
|
9 |
value: !!bool false
|
10 |
put_into_service: #Art. 3(11)
|
11 |
verbose: 'AI project is supplied for first use directly to the deployer or for own use in the Union for its intended purpose;'
|
|
|
12 |
|
13 |
operator_role:
|
14 |
provider: # Art. 2
|
|
|
3 |
verbose: 'AI project is operated by a small or medium-sized enterprise'
|
4 |
value: !!bool false
|
5 |
|
6 |
+
eu_market_status:
|
7 |
placed_on_market: # Art. 3(9)
|
8 |
verbose: 'AI project is being made available on the Union market for the first time'
|
9 |
value: !!bool false
|
10 |
put_into_service: #Art. 3(11)
|
11 |
verbose: 'AI project is supplied for first use directly to the deployer or for own use in the Union for its intended purpose;'
|
12 |
+
value: !!bool false
|
13 |
|
14 |
operator_role:
|
15 |
provider: # Art. 2
|