gradio-app / gradio

Build and share delightful machine learning apps, all in Python. 🌟 Star to support our work!
http://www.gradio.app
Apache License 2.0
30.77k stars 2.29k forks source link

[ImageEditor] - Allow app authors to set limits/ defaults/ names for layers #6505

Open pngwn opened 7 months ago

pngwn commented 7 months ago

For certain usecase it is valuable to authors if they can restrict layers to a specific number + name those layers

cc @hysts.

For example, I'd like to name layers image and segmentation mask, or image, foreground mask, and unknown region mask, etc.

Layers could potentially be a tuple of (FileData, str) as well as just FileData to support this. Need to add layer options to the python api.

abidlabs commented 7 months ago

+1 on being able to constrain the number of layers