First start with the installation of clarifai dependencies as shown here.
pip install "unstructured[clarifai]"

Create a clarifai app with base workflow. Find more information in the create clarifai app.

Run Locally

#!/usr/bin/env bash

unstructured-ingest \
  local \
  --input-path example-docs/book-war-and-peace-1225p.txt \
  --output-dir local-output-to-clarifai \
  --strategy fast \
  --chunk-elements \
  --num-processes 2 \
  --verbose \
  clarifai \
  --app-id "$CLARIFAI_APP_ID" \
  --user-id "$CLARIFAI_USER_ID" \
  --api-key "$CLARIFAI_PAT_KEY" \
  --batch-size 100
The upstream connector can be any of the ones supported, but for the convenience here, showing a sample command using the upstream local connector. For a full list of the options the CLI accepts check unstructured-ingest <upstream connector> clarifai --help. NOTE: Keep in mind that you will need to have all the appropriate extras and dependencies for the file types of the documents contained in your data storage platform if you’re running this locally. You can find more information about this in the installation guide.