Hugging Face
Models
Datasets
Spaces
Community
Docs
Enterprise
Pricing
Log In
Sign Up
Spaces:
hhz520
/
webchat
like
0
Configuration error
App
Files
Files
Community
Fetching metadata from the HF Docker repository...
main
webchat
/
common
/
singleton.py
hhz520
Upload 170 files
61517de
over 1 year ago
raw
Copy download link
history
blame
contribute
delete
Safe
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