Hugging Face
Models
Datasets
Spaces
Posts
Docs
Solutions
Pricing
Log In
Sign Up
Spaces:
unitxt
/
metric
like
0
Running
App
Files
Files
Community
22683d2
metric
/
utils.py
Elron
Upload utils.py with huggingface_hub
4c76401
over 1 year ago
raw
Copy download link
history
blame
Safe
238 Bytes
class
Singleton
(
type
):
_instances = {}
def
__call__
(
cls, *args, **kwargs
):
if
cls
not
in
cls._instances:
cls._instances[cls] =
super
(Singleton, cls).__call__(*args, **kwargs)
return
cls._instances[cls]