Hugging Face
Models
Datasets
Spaces
Posts
Docs
Enterprise
Pricing
Log In
Sign Up
Spaces:
linhj07
/
chatgpt-on-wechat
like
0
Runtime error
App
Files
Files
Community
Fetching metadata from the HF Docker repository...
03ce5eb
chatgpt-on-wechat
/
common
/
singleton.py
linhj07
Upload 139 files
ba12b59
about 2 years ago
raw
Copy download link
history
blame
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