English
detection
open-world
open-set
Inference Endpoints
kelvinou01 commited on
Commit
c56d19f
1 Parent(s): 6eccc06
Files changed (1) hide show
  1. handler.py +2 -8
handler.py CHANGED
@@ -17,14 +17,8 @@ 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
- 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]]:
30
  """
 
17
  class EndpointHandler():
18
  def __init__(self, path):
19
  # Preload all the elements you are going to need at inference.
20
+
21
+ self.model = load_model(CONFIG_PATH, path)
 
 
 
 
 
 
22
 
23
  def __call__(self, data: Dict[str, Any]) -> List[Dict[str, Any]]:
24
  """