Instructions to use microsoft/OmniParser-v2.0 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use microsoft/OmniParser-v2.0 with Transformers:
# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("microsoft/OmniParser-v2.0", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
Fix `imgsz` value when not provided in payload
Browse files- handler.py +1 -1
handler.py
CHANGED
|
@@ -199,7 +199,7 @@ class EndpointHandler:
|
|
| 199 |
|
| 200 |
w, h = image.size
|
| 201 |
if image_size is None:
|
| 202 |
-
imgsz =
|
| 203 |
else:
|
| 204 |
imgsz = [image_size.get("h", h), image_size.get("w", w)]
|
| 205 |
|
|
|
|
| 199 |
|
| 200 |
w, h = image.size
|
| 201 |
if image_size is None:
|
| 202 |
+
imgsz = [h, w]
|
| 203 |
else:
|
| 204 |
imgsz = [image_size.get("h", h), image_size.get("w", w)]
|
| 205 |
|