File size: 1,054 Bytes
7ee9458
 
 
 
 
 
 
 
 
 
 
 
3b62419
7364060
779723a
3b62419
 
 
 
 
 
7364060
779723a
d2009f5
 
 
 
 
7364060
 
 
 
 
 
d2009f5
7364060
779723a
7364060
779723a
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
---
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"


# Sending image in base 64 to api
1. base64 woman_with_bag.jpeg > image.b64

2. curl -X POST "http://localhost:7860/segment" \
-H "Content-Type: application/json" \
-d "{\"image_base64\": \"$(cat image.b64)\"}" 

ir 

curl -X POST "http://localhost:7860/segment" \
-H "Content-Type: application/json" \
-d "{\"image_base64\": \"$(base64 woman_with_bag.jpeg)\"}"