Hosted Inference Detection Example

I want to make an app with an interface similar to the one shown as an example for Object Detection models, like here facebook/detr-resnet-50 路 Hugging Face.

As I understand, it is done with AnnotatedImage and Label, but I couldn鈥檛 find anything quite like it in gradio documentation and demos or huggingface spaces.
Is the code for this or something similar available anywhere?

Thanks!