supercontrast is a package for unifying machine learning models across providers
Project description
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.
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 supercontrast-0.0.2.tar.gz
.
File metadata
- Download URL: supercontrast-0.0.2.tar.gz
- Upload date:
- Size: 30.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 45133345b9e85a3127e0cbb041299d0f192767bcb7987e8482fcd9be72295add |
|
MD5 | f48eaf226bfc8f6442fded831a2db657 |
|
BLAKE2b-256 | 2137bcd3d18e4220c9429eb14594caebdfc75d3eed08df7269ac04525debf235 |
File details
Details for the file supercontrast-0.0.2-py3-none-any.whl
.
File metadata
- Download URL: supercontrast-0.0.2-py3-none-any.whl
- Upload date:
- Size: 44.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 72e341fdf3dca07a92a8b1ba17788da9aae6725054bfd5ec09e63d0115e7d3fb |
|
MD5 | b655226768634db7abe5448c8b402554 |
|
BLAKE2b-256 | 7b9733c3fe58e55ba5af44b4e1fc101f069f01bfcb9a17747d3a0a347ed987ca |