-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #632 from Clarifai/alfrick-branch
added CLI docs
- Loading branch information
Showing
57 changed files
with
645 additions
and
87 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
clarifai model predict --model_url https://clarifai.com/openai/whisper/models/whisper-large-v2 --url https://s3.amazonaws.com/samples.clarifai.com/featured-models/record_out+(3).wav --input_type audio --inference_params "{\"task\":\"transcribe\"}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
user_id: "YOUR_USER_ID_HERE" | ||
pat: "YOUR_PAT_HERE" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
clarifai model predict --model_url https://clarifai.com/clarifai/main/models/general-image-recognition --url https://samples.clarifai.com/dog2.jpeg --input_type image --output_config "{\"max_concepts\":3}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
clarifai model predict --model_id claude-v2 --user_id anthropic --app_id completion --file_path <add-predict-filepath-here> --input_type text |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
clarifai model predict --model_id claude-v2 --user_id anthropic --app_id completion --bytes "Human: Write a tweet on future of AI\nAssistant:" --input_type text |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
status { | ||
code: SUCCESS | ||
description: "Ok" | ||
req_id: "sdk-python-11.0.5-ee8ff730ab144888b6062a6b5ece6d1b" | ||
} | ||
outputs { | ||
id: "dddb6616ba594f41abf77dd8f35b351d" | ||
status { | ||
code: SUCCESS | ||
description: "Ok" | ||
} | ||
created_at { | ||
seconds: 1737623976 | ||
nanos: 884184949 | ||
} | ||
model { | ||
id: "claude-v2" | ||
name: "claude-v2" | ||
created_at { | ||
seconds: 1689360584 | ||
nanos: 718730000 | ||
} | ||
app_id: "completion" | ||
model_version { | ||
id: "f39db57922eb48188cf41a26660aaf74" | ||
created_at { | ||
seconds: 1706762592 | ||
nanos: 463521000 | ||
} | ||
status { | ||
code: MODEL_TRAINED | ||
description: "Model is trained and ready" | ||
} | ||
completed_at { | ||
seconds: 1706762763 | ||
nanos: 246861000 | ||
} | ||
visibility { | ||
gettable: PUBLIC | ||
} | ||
app_id: "completion" | ||
user_id: "anthropic" | ||
metadata { | ||
} | ||
} | ||
user_id: "anthropic" | ||
model_type_id: "text-to-text" | ||
visibility { | ||
gettable: PUBLIC | ||
} | ||
modified_at { | ||
seconds: 1729160329 | ||
nanos: 739032000 | ||
} | ||
workflow_recommended { | ||
} | ||
image { | ||
url: "https://data.clarifai.com/large/users/anthropic/apps/completion/inputs/image/b9d666a9e16a31c8bbbf6da89cceb804" | ||
hosted { | ||
prefix: "https://data.clarifai.com" | ||
suffix: "users/anthropic/apps/completion/inputs/image/b9d666a9e16a31c8bbbf6da89cceb804" | ||
sizes: "small" | ||
sizes: "large" | ||
crossorigin: "use-credentials" | ||
} | ||
} | ||
license_type: CLOSED_SOURCE | ||
source: WRAPPED | ||
creator: "anthropic" | ||
} | ||
input { | ||
id: "13cf01b7817e4b38a0c7d140a3ce0755" | ||
data { | ||
text { | ||
raw: "Human: Write a tweet on future of AI\\nAssistant:" | ||
url: "https://samples.clarifai.com/placeholder.gif" | ||
} | ||
} | ||
} | ||
data { | ||
text { | ||
raw: " Here\'s a draft 280 character tweet on the future of AI:\n\nThe future of AI holds tremendous promise. As algorithms continue improving, AI will transform industries from healthcare to transportation. But we must ensure AI develops safely and ethically, prioritizing human wellbeing over profits or progress at any cost. Together, through foresight and care, we can build an AI-powered world that benefits all." | ||
text_info { | ||
encoding: "UnknownTextEnc" | ||
} | ||
} | ||
} | ||
} |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
clarifai model predict --model_url https://clarifai.com/anthropic/completion/models/claude-v2 --bytes "Human: Write a tweet on future of AI\nAssistant:" --input_type text |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
clarifai model predict --model_id llama2-7b-chat --user_id meta --app_id Llama-2 --url https://samples.clarifai.com/featured-models/llama2-prompt3.txt --input_type text |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
model_url: "https://clarifai.com/anthropic/completion/models/claude-v2" | ||
bytes: "Human: Write a tweet on future of AI\nAssistant:" | ||
input_type: "text" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
clarifai model predict --config <add-config-filepath-here> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
Usage: clarifai model predict [OPTIONS] | ||
|
||
Predict using the given model | ||
|
||
Options: | ||
--config PATH Path to the model predict config file. | ||
--model_id TEXT Model ID of the model used to predict. | ||
--user_id TEXT User ID of the model used to predict. | ||
--app_id TEXT App ID of the model used to predict. | ||
--model_url TEXT Model URL of the model used to predict. | ||
--file_path TEXT File path of file for the model to predict | ||
--url TEXT URL to the file for the model to predict | ||
--bytes TEXT Bytes to the file for the model to predict | ||
--input_id TEXT Existing input id in the app for the model | ||
to predict | ||
--input_type TEXT Type of input | ||
-cc_id, --compute_cluster_id TEXT | ||
Compute Cluster ID to use for the model | ||
-np_id, --nodepool_id TEXT Nodepool ID to use for the model | ||
-dpl_id, --deployment_id TEXT Deployment ID to use for the model | ||
--inference_params TEXT Inference parameters to override | ||
--output_config TEXT Output config to override | ||
--help Show this message and exit. |
1 change: 1 addition & 0 deletions
1
code_snippets/python-sdk/compute-orchestration/cli_predict_with_model.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
$ clarifai model predict --model_id got-ocr-2_0 --user_id stepfun-ai --app_id ocr --url "https://samples.clarifai.com/featured-models/ocr-woman-holding-sold-sign.jpg" --input_type image --deployment_id "test-deployment" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
clarifai model predict --model_url https://clarifai.com/facebook/asr/models/asr-wav2vec2-large-robust-ft-swbd-300h-english --url https://s3.amazonaws.com/samples.clarifai.com/GoodMorning.wav --input_type audio |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
clarifai model predict --model_url https://clarifai.com/stability-ai/Upscale/models/stabilityai-upscale --url https://s3.amazonaws.com/samples.clarifai.com/featured-models/image-captioning-statue-of-liberty.jpeg --input_type image --inference_params "{\"width\":\"1024\"}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
clarifai model predict --model_url https://clarifai.com/salesforce/blip/models/general-english-image-caption-blip --url https://s3.amazonaws.com/samples.clarifai.com/featured-models/image-captioning-statue-of-liberty.jpeg --input_type image |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
clarifai model predict --model_url "https://clarifai.com/openai/chat-completion/models/GPT-4" --bytes "Classes: [`positive`, `negative`, `neutral`] Text: Sunny weather makes me happy. Classify the text into one of the above classes." --input_type "text" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
clarifai model predict --model_url https://clarifai.com/erfan/text-classification/models/sentiment-analysis-twitter-roberta-base --url https://samples.clarifai.com/finantial-sentiment-1.txt --input_type text |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
clarifai model predict --model_url "https://clarifai.com/cohere/embed/models/cohere-embed-english-v3_0" --bytes "In India Green Revolution commenced in the early 1960s that led to an increase in food grain production, especially in Punjab, Haryana, and Uttar Pradesh. Major milestones in this undertaking were the development of high-yielding varieties of wheat. The Green revolution is revolutionary in character due to the introduction of new technology, new ideas, the new application of inputs like HYV seeds, fertilizers, irrigation water, pesticides, etc. As all these were brought suddenly and spread quickly to attain dramatic results thus it is termed as a revolution in green agriculture." --input_type "text" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
clarifai model predict --model_url https://clarifai.com/openai/chat-completion/models/GPT-4 --bytes "What is the future of AI?" --input_type text |
1 change: 1 addition & 0 deletions
1
code_snippets/python-sdk/inference/cli/text_gen_llm_inference.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
clarifai model predict --model_url https://clarifai.com/meta/Llama-3/models/llama-3_1-8b-instruct --bytes "What is the future of AI?" --input_type text --inference_params "{\"temperature\":0.7,\"max_tokens\":200,\"top_k\":50,\"top_p\":0.95}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
clarifai model predict --model_url "https://clarifai.com/eleven-labs/audio-generation/models/speech-synthesis" --bytes "Hello, How are you doing today!" --input_type "text" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
clarifai model predict --model_url "https://clarifai.com/stability-ai/stable-diffusion-2/models/stable-diffusion-xl" --bytes "floor plan for 2 bedroom kitchen house" --input_type "text" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
clarifai model predict --model_url https://clarifai.com/clarifai/main/models/general-image-recognition --url https://samples.clarifai.com/metro-north.jpg --input_type image |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
clarifai model predict --model_url https://clarifai.com/clarifai/main/models/general-image-detection --url https://s3.amazonaws.com/samples.clarifai.com/people_walking2.jpeg --input_type image |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
clarifai model predict --model_url https://clarifai.com/clarifai/main/models/general-image-detection --url https://samples.clarifai.com/beer.mp4 --input_type video --output_config "{\"sample_ms\":2000}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
clarifai model predict --model_url https://clarifai.com/clarifai/main/models/image-embedder-clip --url https://s3.amazonaws.com/samples.clarifai.com/featured-models/general-elephants.jpg --input_type image |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
clarifai model predict --model_url https://clarifai.com/clarifai/main/models/image-general-segmentation --url https://s3.amazonaws.com/samples.clarifai.com/people_walking2.jpeg --input_type image |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.