POST /generatemultipart/form-data with a file (mask image).1{
2 "image": "data:image/png;base64,..."
3}POST /predictmultipart/form-data with a file (mask image).1{
2 "image": "<base64 PNG string>",
3 "slice_index": 2
4}(1, 4, 256, 256). This Space accepts one grayscale mask, resizes to 256×256, normalizes to [0, 1], and duplicates it to 4 slices.decode(embedding) has shape (1, 4, 256, 256) (4 slices). This Space returns one slice (index 2) as a 2D PNG.| Variable | Default | Description |
|---|---|---|
MODEL_REPO | tan200224/Synthetic-CT-Scan_VAE_Conditional | Hugging Face repo with the model. |
MODEL_FILENAME | mask2pic_64model_47.pt | Filename of the checkpoint. |
1pip install -r requirements.txt
2python app.py