kelvinou01
commited on
Commit
•
6eccc06
1
Parent(s):
96e0ac2
- handler.py +7 -0
handler.py
CHANGED
@@ -17,6 +17,13 @@ WEIGHTS_PATH = os.path.join("model", "weights", "groundingdino_swint_ogc.pth")
|
|
17 |
class EndpointHandler():
|
18 |
def __init__(self, path):
|
19 |
# Preload all the elements you are going to need at inference.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
20 |
self.model = load_model(CONFIG_PATH, WEIGHTS_PATH)
|
21 |
|
22 |
def __call__(self, data: Dict[str, Any]) -> List[Dict[str, Any]]:
|
|
|
17 |
class EndpointHandler():
|
18 |
def __init__(self, path):
|
19 |
# Preload all the elements you are going to need at inference.
|
20 |
+
print("===printing cwd===")
|
21 |
+
for root, dirs, files in os.walk(os.getcwd()):
|
22 |
+
print(f"Files in {root}:")
|
23 |
+
for file in files:
|
24 |
+
print(os.path.join(root, file))
|
25 |
+
print("===done printing cwd===")
|
26 |
+
|
27 |
self.model = load_model(CONFIG_PATH, WEIGHTS_PATH)
|
28 |
|
29 |
def __call__(self, data: Dict[str, Any]) -> List[Dict[str, Any]]:
|