dataset_PII_checker / models.py
Ezi Ozoani
updating config file
6338464
raw
history blame contribute delete
No virus
575 Bytes
import os
from pydantic import BaseModel
from typing import Literal
class Config(BaseModel):
target_namespace: str
input_dataset: str
input_model: str
autotrain_project_prefix: str
class WebhookPayloadEvent(BaseModel):
action: Literal["create", "update", "delete"]
scope: str
class WebhookPayloadRepo(BaseModel):
type: Literal["dataset", "model", "space"]
name: str
id: str
private: bool
headSha: str
class WebhookPayload(BaseModel):
event: WebhookPayloadEvent
repo: WebhookPayloadRepo
#config = Config.parse_file(os.path.join(os.getcwd(), "config.json"))