Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Devx 265 improve readme python sdk #205

Merged
merged 13 commits into from
Nov 3, 2023
37 changes: 25 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,26 +29,29 @@ This is the official Python client for interacting with our powerful [API](https

## Table Of Contents

* **[Installation](#installation)**
* **[Getting Started](#getting-started)**
* **[Interacting with Datasets](#interacting-with-datasets)**
* **[Interacting with Inputs](#interacting-with-inputs)**
* **[Installation](#rocket-installation)**
* **[Getting Started](#memo-getting-started)**
* **[Interacting with Datasets](#floppy_disk-interacting-with-datasets)**
* **[Interacting with Inputs](#floppy_disk-interacting-with-inputs)**
* [Input Upload](#input-upload)
* [Input Listing](#input-listing)
* **[Interacting with Models](#interacting-with-models)**
* **[Interacting with Models](#brain-interacting-with-models)**
* [Model Predict](#model-predict)
* [Model Listing](#models-listing)
* **[Interacting with Workflows](#fire-interacting-with-workflows)**
* [Workflow Predict](#workflow-predict)
* [Workflow Listing](#workflows-listing)
* [Workflow Create](#workflow-create)
* [Workflow Export](#workflow-export)
* **[More Examples](#more-examples)**
* **[More Examples](#pushpin-more-examples)**







## 🚀 Installation
## :rocket: Installation


Install from PyPi:
Expand Down Expand Up @@ -94,7 +97,9 @@ apps_generator = client.list_apps()
apps = list(apps_generator)
```

## 💾 Interacting with Datasets

## :floppy_disk: Interacting with Datasets

Clarifai datasets help in managing datasets used for model training and evaluation. It provides functionalities like creating datasets,uploading datasets and exporting datasets as .zip files.

```python
Expand All @@ -120,7 +125,9 @@ Dataset().export(save_path='output.zip', local_archive_path='clarifai-data-proto
```


## 💾 Interacting with Inputs

## :floppy_disk: Interacting with Inputs

You can use ***inputs()*** for adding and interacting with input data. Inputs can be uploaded directly from a URL or a file. You can also view input annotations and concepts.

#### Input Upload
Expand Down Expand Up @@ -155,7 +162,9 @@ all_concepts = list(app.list_concepts())
```


## 🥁 Interacting with Models

## :brain: Interacting with Models

The **Model** Class allows you to perform predictions using Clarifai models. You can specify which model to use by providing the model URL or ID. This gives you flexibility in choosing models. The **App** Class also allows listing of all available Clarifai models for discovery.
For greater control over model predictions, you can pass in an `output_config` to modify the model output as demonstrated below.
#### Model Predict
Expand Down Expand Up @@ -205,7 +214,9 @@ all_llm_community_models = App().list_models(filter_by={"query": "LLM",
all_llm_community_models = list(all_llm_community_models)
```

## 🔥 Interacting with Workflows

## :fire: Interacting with Workflows

Workflows offer a versatile framework for constructing the inference pipeline, simplifying the integration of diverse models. You can use the **Workflow** class to create and manage workflows using **YAML** configuration.
For starting or making quick adjustments to existing Clarifai community workflows using an initial YAML configuration, the SDK provides an export feature.

Expand Down Expand Up @@ -259,6 +270,8 @@ workflow = Workflow("https://clarifai.com/clarifai/main/workflows/Demographics")
workflow.export('demographics_workflow.yml')
```

## 📌 More Examples

## :pushpin: More Examples

See many more code examples in this [repo](https://github.com/Clarifai/examples).
Also see the official [Python SDK docs](https://clarifai-python.readthedocs.io/en/latest/index.html)