No project description provided
Project description
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file etoile_pixtral_safety-0.0.1.tar.gz
.
File metadata
- Download URL: etoile_pixtral_safety-0.0.1.tar.gz
- Upload date:
- Size: 4.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bd1d24876a567fdeb553c1253e74637c22ffe7d2f9768e67ec1613927ec47174 |
|
MD5 | 18cc0efa7c41cf988d3c2dccbca22619 |
|
BLAKE2b-256 | d31b8f445e59aff99112d98099f5e49ccf962705f544d1cee8224a74deda1e6f |
File details
Details for the file etoile_pixtral_safety-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: etoile_pixtral_safety-0.0.1-py3-none-any.whl
- Upload date:
- Size: 5.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d1144826886529a287a8aa52587ef7d39577b349b4a0e73c1d08e52be53d7c6b |
|
MD5 | 9d6c481fdf34fee1a82fe25fa4cc02f1 |
|
BLAKE2b-256 | 85909b7a0028d11a44b343708522edac8b3eb5983b506d0764da2af454560d7a |