Unibox

Latest version: v0.4.13

Safety actively analyzes 685507 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 10

0.4.13

feat: `ub.label_gallery`:

**view and label images within jupyter notebook**:

python
import unibox as ub

uris = ["https://cdn.donmai.us/180x180/8e/ea/8eea944690c0c0b27e303420cb1e65bd.jpg"] * 9
labels = ['Image 1', 'Image 2', 'Image 3'] * 3

label data interactively
ub.label_gallery(uris, labels)

or: view images only
ub.gallery(uris, labels)

0.4.12

feat:
- allow human-readable date in `ub.presigns()`:

python
import unibox as ub

uri = "s3://bucket-external/dataset/dataset_qft/moody_qft_danbooru.json"
signed = ub.presigns(uri, expiration="1y") format: https://github.com/xolox/python-humanfriendly
signed

0.4.11

feat:
- `ub.presigns(s3_uri)`: presigning a s3 uri to create an accessible url. useful for working with s3 uris in transformers pipelines:

python
import unibox as ub
from transformers import pipeline

More models in the model hub.
model_name = "openai/clip-vit-large-patch14"
classifier = pipeline("zero-shot-image-classification", model = model_name, device="cuda")

s3 uri to url
image_to_classify = 's3://bucket-external/dataset/dataset_qft/qft_v5c_twitter-logfav_9.6_60k/100006176_p0.webp'
image_url = ub.presigns(image_to_classify)

get results
labels = ["a girl", "a boy"]
scores = classifier(image_url, candidate_labels = labels)
scores
[{'score': 0.9802619218826294, 'label': 'a girl'},
{'score': 0.0197380892932415, 'label': 'a boy'}]


tweak:
- removing unused methods in s3_client.py

0.4.10

fix:
- `import unibox`: will not require ipython.

0.4.9

fix:
- `ub.peeks()`: handle missing ipython dependency (when using python 3.8, etc) gracefully

0.4.8

fix:
- `ub.concurrent_loads()`: it should now return a list of files in the same order as input list

Page 1 of 10

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.