Update handler.py
Browse files- 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")
|