Hugging Face
Models
Datasets
Spaces
Posts
Docs
Enterprise
Pricing
Log In
Sign Up
Spaces:
jacopoteneggi
/
IBYDMT
like
1
Sleeping
App
Files
Files
Community
f6eb5e3
IBYDMT
/
ibydmt
/
utils.py
jacopoteneggi
Update
4f55ca2
verified
7 months ago
raw
Copy download link
history
blame
Safe
250 Bytes
def
_register_cls
(
name,
dict
=
None
):
def
_register
(
cls
):
if
name
in
dict
:
raise
ValueError(
f"
{name}
is already registered"
)
dict
[name] = cls
return
_register
def
_get_cls
(
name,
dict
=
None
):
return
dict
[name]