Skip to main content

supercontrast is a package for unifying machine learning models across providers

Project description

supercontrast

PyPI Version Y Combinator F24 Discord Documentation Status

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


Download files

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

Source Distribution

supercontrast-0.0.2.tar.gz (30.1 kB view details)

Uploaded Source

Built Distribution

supercontrast-0.0.2-py3-none-any.whl (44.1 kB view details)

Uploaded Python 3

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

Hashes for supercontrast-0.0.2.tar.gz
Algorithm Hash digest
SHA256 45133345b9e85a3127e0cbb041299d0f192767bcb7987e8482fcd9be72295add
MD5 f48eaf226bfc8f6442fded831a2db657
BLAKE2b-256 2137bcd3d18e4220c9429eb14594caebdfc75d3eed08df7269ac04525debf235

See more details on using hashes here.

File details

Details for the file supercontrast-0.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for supercontrast-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 72e341fdf3dca07a92a8b1ba17788da9aae6725054bfd5ec09e63d0115e7d3fb
MD5 b655226768634db7abe5448c8b402554
BLAKE2b-256 7b9733c3fe58e55ba5af44b4e1fc101f069f01bfcb9a17747d3a0a347ed987ca

See more details on using hashes here.

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