semvec/pypi-packages huggingface dataset:
cypstrate 0.1.6
CYPstrate: Prediction of Cytochrome P450 substrates
Requires Python: >=3.8,<3.9

# Cypstrate

CYPstrate consists of a collection of machine learning classifiers (random forest and
support vector machines) for the prediction of substrates and non-substrates of the nine
most important human CYP isozymes in the metabolism of xenobiotics (i.e. CYPs 1A2, 2A6,
2B6, 2C8, 2C9, 2C19, 2D6, 2E1 and 3A4). The models are trained on a high-quality data
set of 1831 substrates and non-substrates compiled from public sources.

## Installation

```bash
# requires Python 3.8
pip install -U cypstrate
```

## Usage

CYPstrate can be called from the **command line**. Examples:

```bash
# input in SMILES format
cypstrate "CCOC(=O)N1CCN(CC1)C2=C(C(=O)C2=O)N3CCN(CC3)C4=CC=C(C=C4)OC"

# prediction is one of "best_performance" (default) or "full_coverage"
cypstrate --prediction-mode full_coverage "CCN(C)C(=O)OC1=CC=CC(=C1)C(C)N(C)C"

# input can be a file
cypstrate molecules.sdf > result.csv

# output format can be specified
cypstrate --output sdf molecules.smiles > result.sdf

# more information via --help
cypstrate --help
```

The model can be used in **Python**. Calling the ```predict``` function of the 
```CypstrateModel``` class results in a pandas DataFrame containing the prediction 
results for each input molecule.

```python
from cypstrate import CypstrateModel

model = CypstrateModel()

# "predict" method accepts a list of SMILES representations
df_predictions = model.predict(['CCN(C)C(=O)OC1=CC=CC(=C1)C(C)N(C)C'])

# ... or a list of file paths
df_predictions = model.predict(['part1.sdf', 'part2.sdf'])
```

The result DataFrame contains the columns:
* **mol_id**: unique number identifying the input molecule
* **input**: the raw representation provided as input (e.g. OCCCCC)
* **input_type**: the representation type of the input (e.g. smiles)
* **source**: the input source (e.g. my_molecules.sdf)
* **name**: the name of the input molecule (if provided in the input)
* **input_mol**: the RDKit molecule parsed from the input representation
* **preprocessed_mol**: the RDKit molecule after preprocessing
* **errors**: a list of errors that occured during reading or preprocessing the input
* **prediction_1a2, prediction_2a6, prediction_2b6, prediction_2c8, prediction_2c9, 
prediction_2c19, prediction_2d6, prediction_2e1, prediction_3a4**: probability (between 
0 and 1) of being a substrate of the given CYP isozyme
* **neighbor_1a2, neighbor_2a6, neighbor_2b6, neighbor_2c8, neighbor_2c9, 
neighbor_2c19, neighbor_2d6,neighbor_2e1,neighbor_3a4**: similarity to the most similar 
molecule in the corresponding training set


## Contribute

```bash
conda env create -f environment.yml
conda activate cypstrate
pip install -e .[dev,test]
ptw
```


## Contributors

* Malte Holmer
* Steffen Hirte
* Axinya Tokareva
autodistill-gemini 0.1.0
Model for use with Autodistill
Requires Python: >=3.7

<div align="center">
  <p>
    <a align="center" href="" target="_blank">
      <img
        width="850"
        src="https://media.roboflow.com/open-source/autodistill/autodistill-banner.png"
      >
    </a>
  </p>
</div>

# Autodistill Gemini Module

This repository contains the code supporting the Gemini base model for use with [Autodistill](https://github.com/autodistill/autodistill).

[Gemini](https://deepmind.google/technologies/gemini/), developed by Google, is a multimodal computer vision model that allows you to ask questions about images. You can use Gemini with Autodistill for image classification.

You can combine Gemini with other base models to label regions of an object. For example, you can use Grounding DINO to identify abstract objects (i.e. a vinyl record) then Gemini to classify the object (i.e. say which of five vinyl records the region represents). Read the Autodistill [Combine Models](https://docs.autodistill.com/utilities/combine-models/) guide for more information.

> [!NOTE]
> Using this project will incur billing charges for API calls to the Gemini API.
> Refer to the [Google Cloud pricing](https://cloud.google.com/pricing/) page for more information and to calculate your expected pricing. This package makes one API call per image you want to label.

Read the full [Autodistill documentation](https://autodistill.github.io/autodistill/).

## Installation

To use Gemini with autodistill, you need to install the following dependency:


```bash
pip3 install autodistill-gemini
```

## Quickstart

```python
from autodistill_gemini import Gemini

# define an ontology to map class names to our Gemini prompt
# the ontology dictionary has the format {caption: class}
# where caption is the prompt sent to the base model, and class is the label that will
# be saved for that caption in the generated annotations
# then, load the model
base_model = Gemini(
    ontology=CaptionOntology(
        {
            "person": "person",
            "a forklift": "forklift"
        }
    ),
    gcp_region="us-central1",
    gcp_project="project-name",
)

# run inference on an image
result = base_model.predict("image.jpg")

print(result)

# label a folder of images
base_model.label("./context_images", extension=".jpeg")
```

## License

This project is licensed under an [MIT license](LICENSE).

## 🏆 Contributing

We love your input! Please see the core Autodistill [contributing guide](https://github.com/autodistill/autodistill/blob/main/CONTRIBUTING.md) to get started. Thank you 🙏 to all our contributors!