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
- ...and more!
From some of the most popular Providers:
- AWS
- Azure
- GCP
- OpenAI
- Anthropic
- ...and more!
If you want the full list of supported tasks and providers, please reference our docs.
pip install supercontrast
conda env create -f environment.yml
supercontrast
is supported on Python 3.12 (other versions may be unstable)
If you are processing pdfs, you will need to install poppler
. We recommend using conda to install it:
conda install -c conda-forge poppler
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.
We welcome contributions to the project! To contribute, please follow these steps:
git clone https://github.com/supercontrast/supercontrast.git
pip install -e .
black .
isort .
pytest -k <test_name>
Submit a PR to the main branch! We will review and merge your PR.