Skip to main content

No project description provided

Project description

PyPI version License: MIT Downloads

etoile_pixtral_safety

etoile_pixtral_safety is a Python package developed as part of the Mistral Étoile project during the London Hackathon. This package provides tools for detecting various types of potentially harmful content in images using advanced machine learning models, tailored specifically for online safety and content monitoring.

Installation

To install etoile_pixtral_safety, use pip:

pip install etoile_pixtral_safety

Usage

This package contains functions to check for harmful content and locate specific sections within images that may contain undesirable elements. It utilizes LangChain and HuggingFace technologies for deep learning inference.

Setting Up the Model

from langchain_mistralai import ChatMistralAI

CVISION_MODEL = "pixtral-12b-2409"

llm = ChatMistralAI(
    model=CVISION_MODEL,
    temperature=0,
    max_retries=2,
)

Checking for Harmful Content

from etoile_pixtral_safety import check_image

# `display_url` should be a string containing the URL to the image you want to check.
display_url = "https://example.com/path/to/image.jpg"
result = check_image(llm, display_url, verbose=True)
print(result)

Finding Location of Harmful Content

from etoile_pixtral_safety import find_location

result = find_location(llm, display_url, verbose=True)
print(result)

Features

  • Detects a wide range of harmful content in images including explicit material, violence, and other undesirable elements.
  • Provides precise location data for identified content within images.
  • Integrates seamlessly with state-of-the-art machine learning platforms.

Contributing

Contributions, issues, and feature requests are welcome! Feel free to check the issues page.

License

etoile_pixtral_safety is licensed under the MIT License.

Acknowledgements

This package was developed by Evgenii (Eugene) Evstafev as part of the comprehensive suite of tools for the Mistral Étoile project at the London Hackathon. More details about the project can be found on the GitHub repository.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

etoile_pixtral_safety-0.0.1.tar.gz (4.2 kB view hashes)

Uploaded Source

Built Distribution

etoile_pixtral_safety-0.0.1-py3-none-any.whl (5.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page