Instructions to use halimb/depth-anything-small-hf with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use halimb/depth-anything-small-hf with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("depth-estimation", model="halimb/depth-anything-small-hf")# Load model directly from transformers import AutoImageProcessor, AutoModelForDepthEstimation processor = AutoImageProcessor.from_pretrained("halimb/depth-anything-small-hf") model = AutoModelForDepthEstimation.from_pretrained("halimb/depth-anything-small-hf") - Notebooks
- Google Colab
- Kaggle
Update handler.py
Browse files- handler.py +1 -1
handler.py
CHANGED
|
@@ -15,7 +15,7 @@ class EndpointHandler():
|
|
| 15 |
|
| 16 |
|
| 17 |
def __call__(self, data: Dict[str, Any]) -> List[Dict[str, Any]]:
|
| 18 |
-
base64_image = data.pop("
|
| 19 |
if base64_image is None:
|
| 20 |
raise ValueError("No image provided")
|
| 21 |
|
|
|
|
| 15 |
|
| 16 |
|
| 17 |
def __call__(self, data: Dict[str, Any]) -> List[Dict[str, Any]]:
|
| 18 |
+
base64_image = data.pop("inputs",data)
|
| 19 |
if base64_image is None:
|
| 20 |
raise ValueError("No image provided")
|
| 21 |
|