IcecreamDetect / README_HF_SPACE.md
ibsocr1's picture
Upload 13 files
47f2ebf verified
|
Raw
History Blame Contribute Delete
674 Bytes

A newer version of the Gradio SDK is available: 6.26.0

Upgrade

Hugging Face Space configuration

Create a Docker Space and upload the project files.

The Space should contain:

Dockerfile
requirements.txt
app/
model/

For a model stored on the Hugging Face Hub, you can instead omit the local model/ directory and set the Space variables:

MODEL_ID=YOUR_USERNAME/YOUR_MODEL_REPO
HF_TOKEN=hf_your_token_if_private

The API starts on port 7860.

Endpoints:

  • GET /health
  • POST /predict
  • GET /docs

Example:

curl -X POST \
  -F "file=@freezer.jpg" \
  "https://YOUR-SPACE-NAME.hf.space/predict?return_image=true"

The annotated_image_base64 field contains the annotated result image.