Spaces:
Runtime error
Runtime error
Nima Boscarino
commited on
Commit
·
eda68da
1
Parent(s):
f8c21da
Use new IntendedPurposeCheck on front-end
Browse files- app.py +13 -10
- compliance_checks/__init__.py +1 -0
app.py
CHANGED
|
@@ -5,16 +5,10 @@ from compliance_checks import (
|
|
| 5 |
ComplianceSuite,
|
| 6 |
ComplianceCheck,
|
| 7 |
IntendedPurposeCheck,
|
| 8 |
-
GeneralLimitationsCheck,
|
| 9 |
-
ComputationalRequirementsCheck,
|
| 10 |
)
|
| 11 |
|
| 12 |
-
from bloom_card import bloom_card
|
| 13 |
-
|
| 14 |
checks = [
|
| 15 |
IntendedPurposeCheck(),
|
| 16 |
-
GeneralLimitationsCheck(),
|
| 17 |
-
ComputationalRequirementsCheck(),
|
| 18 |
]
|
| 19 |
suite = ComplianceSuite(checks=checks)
|
| 20 |
|
|
@@ -52,11 +46,21 @@ def read_file(file_obj):
|
|
| 52 |
|
| 53 |
model_card_box = gr.TextArea(label="Model Card")
|
| 54 |
|
| 55 |
-
with gr.Blocks(css="
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 56 |
gr.Markdown("""\
|
| 57 |
# RegCheck AI
|
| 58 |
-
This Space uses model cards’ information as a source of regulatory compliance with some provisions of the proposed
|
| 59 |
-
|
|
|
|
|
|
|
|
|
|
| 60 |
""")
|
| 61 |
|
| 62 |
with gr.Row(elem_id="reverse-row"):
|
|
@@ -73,7 +77,6 @@ with gr.Blocks(css="#reverse-row { flex-direction: row-reverse;} #file-upload .b
|
|
| 73 |
model_id_search = gr.Text(label="Model ID")
|
| 74 |
gr.Examples(
|
| 75 |
examples=[
|
| 76 |
-
"society-ethics/model-card-webhook-test",
|
| 77 |
"bigscience/bloom",
|
| 78 |
"roberta-base",
|
| 79 |
"openai/clip-vit-base-patch32",
|
|
|
|
| 5 |
ComplianceSuite,
|
| 6 |
ComplianceCheck,
|
| 7 |
IntendedPurposeCheck,
|
|
|
|
|
|
|
| 8 |
)
|
| 9 |
|
|
|
|
|
|
|
| 10 |
checks = [
|
| 11 |
IntendedPurposeCheck(),
|
|
|
|
|
|
|
| 12 |
]
|
| 13 |
suite = ComplianceSuite(checks=checks)
|
| 14 |
|
|
|
|
| 46 |
|
| 47 |
model_card_box = gr.TextArea(label="Model Card")
|
| 48 |
|
| 49 |
+
with gr.Blocks(css="""\
|
| 50 |
+
#reverse-row {
|
| 51 |
+
flex-direction: row-reverse;
|
| 52 |
+
}
|
| 53 |
+
#file-upload .boundedheight {
|
| 54 |
+
max-height: 100px;
|
| 55 |
+
}
|
| 56 |
+
""") as demo:
|
| 57 |
gr.Markdown("""\
|
| 58 |
# RegCheck AI
|
| 59 |
+
This Space uses model cards’ information as a source of regulatory compliance with some provisions of the proposed \
|
| 60 |
+
[EU AI Act](https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=celex%3A52021PC0206). For the moment being, the \
|
| 61 |
+
demo is a **prototype** limited to specific provisions of Article 13 of the AI Act, related to “Transparency and \
|
| 62 |
+
provision of information to users”. Choose a model card and check whether it has some useful info to comply with \
|
| 63 |
+
the EU AI Act! **(DISCLAIMER: this is NOT a commercial or legal advice-related product)**\
|
| 64 |
""")
|
| 65 |
|
| 66 |
with gr.Row(elem_id="reverse-row"):
|
|
|
|
| 77 |
model_id_search = gr.Text(label="Model ID")
|
| 78 |
gr.Examples(
|
| 79 |
examples=[
|
|
|
|
| 80 |
"bigscience/bloom",
|
| 81 |
"roberta-base",
|
| 82 |
"openai/clip-vit-base-patch32",
|
compliance_checks/__init__.py
CHANGED
|
@@ -1,5 +1,6 @@
|
|
| 1 |
from compliance_checks.base import (
|
| 2 |
ComplianceSuite,
|
|
|
|
| 3 |
)
|
| 4 |
|
| 5 |
from compliance_checks.intended_purpose import (
|
|
|
|
| 1 |
from compliance_checks.base import (
|
| 2 |
ComplianceSuite,
|
| 3 |
+
ComplianceCheck,
|
| 4 |
)
|
| 5 |
|
| 6 |
from compliance_checks.intended_purpose import (
|