supercontrast
supercontrast is a package for easily running machine learning models from a variety of providers in a unified interface. We're adding more tasks and providers all the time, and would love help from the community to add more!
We currently support the following tasks:
- OCR
- Sentiment Analysis
- Transcription
- Translation
From some of the most popular providers:
- AWS
- Azure
- GCP
- OpenAI
- Anthropic
- ...and more!
Installation
pip install supercontrast
NOTE: supercontrast is supported on Python 3.12, it may be unstable on other versions. If you have conda installed, you can create an environment with the required packages using the environment.yml file:
conda env create -f environment.yml
Usage
from supercontrast import (
Provider,
SentimentAnalysisRequest,
SuperContrastClient,
Task,
)
# Sending a Sentiment Analysis Request to AWS
client = SuperContrastClient(task=Task.SENTIMENT_ANALYSIS, providers=[Provider.AWS])
input_text = "I love programming in Python!"
response, metadata = client.request(SentimentAnalysisRequest(text=input_text))
For more examples of how to use supercontrast, refer to examples.py in the examples folder.
Contributing
We welcome contributions to the project! To contribute, please follow these steps:
1. Clone the repo
git clone https://github.com/supercontrast/supercontrast.git
2. Install package
pip install -e .[dev]
3. Run linting
black .
isort .
4. Run tests
pytest -k <test_name>
5. Submit a PR
Submit a PR to the main branch! We will review and merge your PR.
Metadata
Release files for supercontrast 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| supercontrast-0.0.2.tar.gz | 30.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| supercontrast-0.0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 74.2 kB
Release files / supercontrast-0.0.2.tar.gz
| Download URL | supercontrast-0.0.2.tar.gz |
|---|---|
| Size | 30.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
45133345b9e85a3127e0cbb041299d0f192767bcb7987e8482fcd9be72295add
|
|
BLAKE2b-256 checksum How to use checksums |
2137bcd3d18e4220c9429eb14594caebdfc75d3eed08df7269ac04525debf235
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.5
|
Release files / supercontrast-0.0.2-py3-none-any.whl
| Download URL | supercontrast-0.0.2-py3-none-any.whl |
|---|---|
| Size | 44.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
72e341fdf3dca07a92a8b1ba17788da9aae6725054bfd5ec09e63d0115e7d3fb
|
|
BLAKE2b-256 checksum How to use checksums |
7b9733c3fe58e55ba5af44b4e1fc101f069f01bfcb9a17747d3a0a347ed987ca
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.5
|