CanerDedeoglu commited on
Commit
c20029c
·
verified ·
1 Parent(s): f1f2c46

Update handler.py

Browse files
Files changed (1) hide show
  1. handler.py +4 -0
handler.py CHANGED
@@ -176,6 +176,10 @@ class EndpointHandler:
176
 
177
  @torch.inference_mode()
178
  def __call__(self, inputs: Dict[str, Any]) -> Dict[str, Any]:
 
 
 
 
179
  # ---- girişler
180
  prompt = inputs.get("query") or inputs.get("prompt") or inputs.get("istem") or ""
181
  image_in = inputs.get("image") or inputs.get("image_url") or inputs.get("img")
 
176
 
177
  @torch.inference_mode()
178
  def __call__(self, inputs: Dict[str, Any]) -> Dict[str, Any]:
179
+
180
+ if "inputs" in inputs and isinstance(inputs["inputs"], dict):
181
+ inputs = inputs["inputs"]
182
+
183
  # ---- girişler
184
  prompt = inputs.get("query") or inputs.get("prompt") or inputs.get("istem") or ""
185
  image_in = inputs.get("image") or inputs.get("image_url") or inputs.get("img")