Metadata-Version: 2.1
Name: gradio_image_prompter
Version: 0.1.0
Summary: A gradio component to upload images and process point/box prompts.
Author-email: PhyscalX <neopenx@gmail.com>
License-Expression: Apache-2.0
License-File: LICENSE
Keywords: gradio-custom-component,gradio-template-Image
Classifier: Development Status :: 3 - Alpha
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Scientific/Engineering :: Visualization
Requires-Python: >=3.8
Requires-Dist: gradio<5.0,>=4.0
Provides-Extra: dev
Requires-Dist: build; extra == 'dev'
Requires-Dist: twine; extra == 'dev'
Description-Content-Type: text/markdown

# Image Prompter for Gradio
A gradio component to upload images and process point/box prompts.

This custom component is developed for [Tokenize Anything](https://github.com/baaivision/tokenize-anything) gradio demo.

## Installation

### Preliminaries

``gradio`` >= 4.0.0

### Installing Package

```bash
pip install gradio-image-prompter
```

## Quick Start

### Development

```bash
cd gradio-image-prompter
gradio cc install
gradio cc dev
```

### Example

```python
import gradio as gr
from gradio_image_prompter import ImagePrompter

demo = gr.Interface(
    lambda prompts: (prompts["image"], prompts["points"]),
    ImagePrompter(show_label=False),
    [gr.Image(show_label=False), gr.Dataframe(label="Points")],
)
demo.launch()

```

## License
[Apache License 2.0](LICENSE)

## Acknowledgement

We thank the repositories: [SAM](https://github.com/facebookresearch/segment-anything), [Gradio Box](https://github.com/ShoufaChen/gradio-box) and [Gradio](https://github.com/gradio-app/gradio).
