Instructions to use Blueway/inference-endpoint-for-omdet-turbo-swin-tiny-hf with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Blueway/inference-endpoint-for-omdet-turbo-swin-tiny-hf with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("zero-shot-object-detection", model="Blueway/inference-endpoint-for-omdet-turbo-swin-tiny-hf")# Load model directly from transformers import AutoProcessor, AutoModelForZeroShotObjectDetection processor = AutoProcessor.from_pretrained("Blueway/inference-endpoint-for-omdet-turbo-swin-tiny-hf") model = AutoModelForZeroShotObjectDetection.from_pretrained("Blueway/inference-endpoint-for-omdet-turbo-swin-tiny-hf", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Update handler.py
Browse files- handler.py +1 -1
handler.py
CHANGED
|
@@ -13,7 +13,7 @@ class EndpointHandler():
|
|
| 13 |
def __call__(self, data: Dict[str, Any]) -> List[Dict[str, Any]]:
|
| 14 |
"""
|
| 15 |
data args:
|
| 16 |
-
|
| 17 |
candidates (:obj:`list`)
|
| 18 |
Return:
|
| 19 |
A :obj:`list`:. The list contains items that are dicts should be liked {"label": "XXX", "score": 0.82}
|
|
|
|
| 13 |
def __call__(self, data: Dict[str, Any]) -> List[Dict[str, Any]]:
|
| 14 |
"""
|
| 15 |
data args:
|
| 16 |
+
image (:obj:`string`)
|
| 17 |
candidates (:obj:`list`)
|
| 18 |
Return:
|
| 19 |
A :obj:`list`:. The list contains items that are dicts should be liked {"label": "XXX", "score": 0.82}
|