Hugging Face
Models
Datasets
Spaces
Community
Docs
Enterprise
Pricing
Log In
Sign Up
Spaces:
BG5
/
chatvx
like
0
Paused
App
Files
Files
Community
Fetching metadata from the HF Docker repository...
main
chatvx
/
common
/
singleton.py
BG5
Upload 153 files
e63cde0
over 2 years ago
raw
Copy download link
history
blame
contribute
delete
217 Bytes
def
singleton
(
cls
):
instances = {}
def
get_instance
(
*args, **kwargs
):
if
cls
not
in
instances:
instances[cls] = cls(*args, **kwargs)
return
instances[cls]
return
get_instance