# Rubbrband: Monitoring for Stable Diffusion

Rubbrband detects deformities in your images generated by Stable Diffusion at scale.

## Installation

```bash
pip install rubbrband
```

## Usage

```python
import rubbrband
rubbrband.init("YOUR_API_KEY")
rubbrband.upload(image="https://example.com/image.png", prompt="Prompt used to generate image")
```

## Uploading Images to Rubbrband
1. Using a URL
```python
rubbrband.upload(image="https://example.com/image.png", prompt="Prompt used to generate image")
```
2. Using a PIL Image
```python
from PIL import Image
rubbrband.upload(image=Image.open("/path/to/image.png"), prompt="Prompt used to generate image")
```
3. Using a path
```python
rubbrband.upload(image="/path/to/image.png", prompt="Prompt used to generate image")
``` 
4. Using a context manager
```python
with open("/path/to/image.png", "rb") as f:
    rubbrband.upload(image=f, prompt="Prompt used to generate image")
```

## Getting Evaluation Results
```python
filename = rubbrband.upload(image="/path/to/image.png", prompt="Prompt used to generate image")
evaluation = rubbrband.get_image_metadata(filename)
```