Spaces:
Running
A newer version of the Gradio SDK is available:
5.20.0
title: Segmentation
emoji: π
colorFrom: indigo
colorTo: red
sdk: gradio
sdk_version: 5.19.0
app_file: app.py
pinned: false
Check out the configuration reference at https://huggingface.co./docs/hub/spaces-config-reference
Sending image file to api
curl -X POST "https://alexgenovese-segmentation.hf.space/segment"
-F "data=[{"type": "image", "value": null}]"
-F "data=@woman_with_bag.jpeg"
-H "Content-Type: multipart/form-data"
-o response.json
Sending image file to api
curl -X POST "https://alexgenovese-segmentation.hf.space/segment"
-H "accept: application/json"
-H "Content-Type: multipart/form-data"
-F "file=@woman_with_bag.jpeg"
-o response.json
Sending image in base 64 to api
base64 woman_with_bag.jpeg > image.b64
curl -X POST "https://alexgenovese-segmentation.hf.space/segment"
-H "Content-Type: application/json"
-d "{"image_base64": "$(cat image.b64)"}"
or
curl -X POST "https://alexgenovese-segmentation.hf.space/segment"
-H "Content-Type: application/json"
-d "{"image_base64": "$(base64 woman_with_bag.jpeg)"}"
Output
{"mask":"data:image/png;base64...","annotations":{"mask":[[]]"label":"fashion"}}
Segmetn-url endpoint
curl -X POST "https://alexgenovese-segmentation.hf.space/segment-url"
-H "Content-Type: application/json"
-d '{
"url": "https://plus.unsplash.com/premium_photo-1673210886161-bfcc40f54d1f?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxzZWFyY2h8MXx8cGVyc29uJTIwc3RhbmRpbmd8ZW58MHx8MHx8&w=1000&q=80"
}'
-o response.json