Loadimg

Latest version: v0.3.3

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

Scan your dependencies

Page 1 of 2

0.3.3

What's Changed
* update base64 implementation to support huggingface inference by not-lain in https://github.com/not-lain/loadimg/pull/13

this will support sending images to huggingface inference API as base64

python
from loadimg import load_img
from huggingface_hub import InferenceClient

or load a local image
my_b64_img = load_img("https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg", output_type="base64" )

client = InferenceClient(api_key="hf_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx")

messages = [
{
"role": "user",
"content": [
{
"type": "text",
"text": "Describe this image in one sentence."
},
{
"type": "image_url",
"image_url": {
"url": my_b64_img base64 allows using images without uploading them to the web
}
}
]
}
]

stream = client.chat.completions.create(
model="meta-llama/Llama-3.2-11B-Vision-Instruct",
messages=messages,
max_tokens=500,
stream=True
)

for chunk in stream:
print(chunk.choices[0].delta.content, end="")


**LOADIMG FUTURE RELEASES █████░**

**Full Changelog**: https://github.com/not-lain/loadimg/compare/v0.3.2...v0.3.3

0.3.2

What's Changed
* fix huggingface file download

**Full Changelog**: https://github.com/not-lain/loadimg/compare/v0.3.1...v0.3.2

**LOADIMG FUTURE RELEASES █████░**

0.3.1

What's Changed
* perf: improve naming by Abbhiishek in https://github.com/not-lain/loadimg/pull/12

New Contributors
* Abbhiishek made their first contribution in https://github.com/not-lain/loadimg/pull/12

**Full Changelog**: https://github.com/not-lain/loadimg/compare/v0.3.0...v0.3.1

**LOADIMG FUTURE RELEASES █████░**

0.3.0

What's Changed
* Added option to select Image input_type and also made Base64 image support better. by KingNish24 in https://github.com/not-lain/loadimg/pull/8

New Contributors
* KingNish24 made their first contribution in https://github.com/not-lain/loadimg/pull/8

**Full Changelog**: https://github.com/not-lain/loadimg/compare/v0.2.1...v0.3.0

**LOADIMG FUTURE RELEASES █████░**

0.2.1

🛠️Hotfix for the version parameter

0.2.0

What's Changed
* Add base64 support by Saptarshi-Bandopadhyay in https://github.com/not-lain/loadimg/pull/2
* update docstring and readme by Saptarshi-Bandopadhyay in https://github.com/not-lain/loadimg/pull/4
* improve parameter typing and better error messages by not-lain in https://github.com/not-lain/loadimg/pull/6
* add the `__version__` variable to loadimg by not-lain in https://github.com/not-lain/loadimg/pull/7

New Contributors
* Saptarshi-Bandopadhyay made their first contribution in https://github.com/not-lain/loadimg/pull/2=

I am also glad to announce that we have reached 100,000 downloads 🥳

![image](https://github.com/user-attachments/assets/29e92ad3-ef12-4729-850a-62e374c185ac)

**Full Changelog**: https://github.com/not-lain/loadimg/compare/v0.1.2...v0.2.0

**LOADIMG FUTURE RELEASES █████░**

Page 1 of 2

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.