Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/supercontrast-ai/supercontrast

Find the best ML model for your use case | Y Combinator Fall 2024
https://github.com/supercontrast-ai/supercontrast

ai aws aws-sdk azure gcp machine-learning ycombinator

Last synced: 19 days ago
JSON representation

Find the best ML model for your use case | Y Combinator Fall 2024

Awesome Lists containing this project

README

        

# 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**
- **...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](https://docs.supercontrast.com/introduction).

## Installation

### pip

```bash
pip install supercontrast
```

### conda

```bash
conda env create -f environment.yml
```

## Additional Requirements

### Python Version
`supercontrast` is supported on **Python 3.12** (other versions may be unstable)

### PDF Processing
If you are processing pdfs, you will need to install `poppler`. We recommend using conda to install it:

```bash
conda install -c conda-forge poppler
```

## Usage

```python
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](examples/examples.py) in the [examples](examples/) folder.

## Contributing

We welcome contributions to the project! To contribute, please follow these steps:

### 1. Clone the repo

```bash
git clone https://github.com/supercontrast/supercontrast.git
```

### 2. Install package in editable mode

```bash
pip install -e .
```

### 3. Run linting

```bash
black .
isort .
```

### 4. Run tests

```bash
pytest -k
```

### 5. Submit a PR

Submit a PR to the main branch! We will review and merge your PR.