selectmixer commited on
Commit
5100032
·
1 Parent(s): 1b37e81

endpoint fix

Browse files
Files changed (1) hide show
  1. handler.py +3 -3
handler.py CHANGED
@@ -9,7 +9,7 @@ from DepthFlow import DepthScene
9
  from DepthFlow.Motion import Presets
10
 
11
  class EndpointHandler():
12
- def __init__(self):
13
  """
14
  Initialize the handler and load necessary resources.
15
  This method is called once when the service starts.
@@ -90,7 +90,7 @@ class EndpointHandler():
90
  'video': video_bytes
91
  }
92
 
93
- def __call__(self, inputs):
94
  """
95
  Handle the incoming request.
96
 
@@ -102,7 +102,7 @@ class EndpointHandler():
102
  """
103
  try:
104
  # Preprocess
105
- image_path = self.preprocess(inputs)
106
 
107
  # Inference
108
  video_path = self.inference(image_path)
 
9
  from DepthFlow.Motion import Presets
10
 
11
  class EndpointHandler():
12
+ def __init__(self, path=""):
13
  """
14
  Initialize the handler and load necessary resources.
15
  This method is called once when the service starts.
 
90
  'video': video_bytes
91
  }
92
 
93
+ def __call__(self, data):
94
  """
95
  Handle the incoming request.
96
 
 
102
  """
103
  try:
104
  # Preprocess
105
+ image_path = self.preprocess(data)
106
 
107
  # Inference
108
  video_path = self.inference(image_path)