Datasets:

ArXiv:
Elron commited on
Commit
b548ba5
1 Parent(s): e0870ab

Upload utils.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. utils.py +11 -0
utils.py ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import abc
2
+
3
+ class Singleton(abc.ABC):
4
+ _instances = {}
5
+
6
+ def __new__(cls, *args, **kwargs):
7
+ if cls not in cls._instances:
8
+ cls._instances[cls] = super(Singleton, cls).__new__(cls)
9
+ return cls._instances[cls]
10
+
11
+