Spaces:
Runtime error
Runtime error
File size: 604 Bytes
11bd448 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
import gradio as gr
from huggingface_hub import ModelCard
from compliance_checks import (
ComplianceSuite,
ModelProviderIdentityCheck,
IntendedPurposeCheck
)
def run_compliance_check(repo_name):
model_card = ModelCard.load(repo_id_or_path=repo_name).content
suite = ComplianceSuite(checks=[
ModelProviderIdentityCheck(),
IntendedPurposeCheck()
])
results = suite.run(model_card)
return str(results)
gr.Interface(
fn=run_compliance_check,
inputs="text",
outputs="text",
examples=[["society-ethics/model-card-webhook-test"]]
).launch()
|