typefile
{
"input_audio": "https://replicate.delivery/pbxt/LfbiyaVvY3JawrMfmfIHCYB1NFrOmYRth8MHJfENjZ4Q19wQ/vicuna_2.wav",
"max_new_tokens": 256,
"prompt": "Please directly answer the questions in the user's speech",
"temperature": 0.5,
"top_p": 0.75
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_Tdr**********************************
This is your API token. Keep it to yourself.
import Replicate from "replicate";
const replicate = new Replicate({
auth: process.env.REPLICATE_API_TOKEN,
});
Run ictnlp/llama-omni using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"ictnlp/llama-omni:36c9bcf70a56f40d9a27445c30c769308b18180296749f86ec9b682baf7ad351",
{
input: {
input_audio: "https://replicate.delivery/pbxt/LfbiyaVvY3JawrMfmfIHCYB1NFrOmYRth8MHJfENjZ4Q19wQ/vicuna_2.wav",
max_new_tokens: 256,
prompt: "Please directly answer the questions in the user's speech",
temperature: 0.5,
top_p: 0.75
}
}
);
console.log(output);
To learn more, take a look at the guide on getting started with Node.js.
pip install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_Tdr**********************************
This is your API token. Keep it to yourself.
import replicate
Run ictnlp/llama-omni using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"ictnlp/llama-omni:36c9bcf70a56f40d9a27445c30c769308b18180296749f86ec9b682baf7ad351",
input={
"input_audio": "https://replicate.delivery/pbxt/LfbiyaVvY3JawrMfmfIHCYB1NFrOmYRth8MHJfENjZ4Q19wQ/vicuna_2.wav",
"max_new_tokens": 256,
"prompt": "Please directly answer the questions in the user's speech",
"temperature": 0.5,
"top_p": 0.75
}
)
print(output)
To learn more, take a look at the guide on getting started with Python.
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_Tdr**********************************
This is your API token. Keep it to yourself.
Run ictnlp/llama-omni using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
curl -s -X POST \
-H "Authorization: Bearer $REPLICATE_API_TOKEN" \
-H "Content-Type: application/json" \
-H "Prefer: wait" \
-d $'{
"version": "ictnlp/llama-omni:36c9bcf70a56f40d9a27445c30c769308b18180296749f86ec9b682baf7ad351",
"input": {
"input_audio": "https://replicate.delivery/pbxt/LfbiyaVvY3JawrMfmfIHCYB1NFrOmYRth8MHJfENjZ4Q19wQ/vicuna_2.wav",
"max_new_tokens": 256,
"prompt": "Please directly answer the questions in the user\'s speech",
"temperature": 0.5,
"top_p": 0.75
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Object output with 2 properties
To deal with stress, try deep breathing exercises, meditation, and physical activity like yoga or a brisk walk. Also, prioritize tasks, set realistic goals, and take regular breaks to help manage stress.
{
"id": "7kxhnhz2v5rgm0cj3gar5s5qc8",
"model": "ictnlp/llama-omni",
"version": "36c9bcf70a56f40d9a27445c30c769308b18180296749f86ec9b682baf7ad351",
"input": {
"input_audio": "https://replicate.delivery/pbxt/LfbiyaVvY3JawrMfmfIHCYB1NFrOmYRth8MHJfENjZ4Q19wQ/vicuna_2.wav",
"max_new_tokens": 256,
"prompt": "Please directly answer the questions in the user's speech",
"temperature": 0.5,
"top_p": 0.75
},
"logs": "/root/.pyenv/versions/3.10.15/lib/python3.10/site-packages/transformers/utils/hub.py:127: FutureWarning: Using `TRANSFORMERS_CACHE` is deprecated and will be removed in v5 of Transformers. Use `HF_HOME` instead.\nwarnings.warn(\nTraceback (most recent call last):\nFile \"<string>\", line 1, in <module>\nFile \"/root/.pyenv/versions/3.10.15/lib/python3.10/multiprocessing/spawn.py\", line 116, in spawn_main\nexitcode = _main(fd, parent_sentinel)\nFile \"/root/.pyenv/versions/3.10.15/lib/python3.10/multiprocessing/spawn.py\", line 126, in _main\nself = reduction.pickle.load(from_parent)\n_pickle.UnpicklingError: pickle data was truncated\n/root/.pyenv/versions/3.10.15/lib/python3.10/site-packages/transformers/utils/hub.py:127: FutureWarning: Using `TRANSFORMERS_CACHE` is deprecated and will be removed in v5 of Transformers. Use `HF_HOME` instead.\nwarnings.warn(\n/root/.pyenv/versions/3.10.15/lib/python3.10/site-packages/transformers/utils/hub.py:127: FutureWarning: Using `TRANSFORMERS_CACHE` is deprecated and will be removed in v5 of Transformers. Use `HF_HOME` instead.\nwarnings.warn(\n/root/.pyenv/versions/3.10.15/lib/python3.10/site-packages/transformers/utils/hub.py:127: FutureWarning: Using `TRANSFORMERS_CACHE` is deprecated and will be removed in v5 of Transformers. Use `HF_HOME` instead.\nwarnings.warn(\n/root/.pyenv/versions/3.10.15/lib/python3.10/site-packages/transformers/utils/hub.py:127: FutureWarning: Using `TRANSFORMERS_CACHE` is deprecated and will be removed in v5 of Transformers. Use `HF_HOME` instead.\nwarnings.warn(\nTo deal with stress, try deep breathing exercises, meditation, and physical activity like yoga or a brisk walk. Also, prioritize tasks, set realistic goals, and take regular breaks to help manage stress.\noutput_units: 79 868 196 721 250 485 948 284 327 635 205 521 787 935 271 333 523 918 85 519 589 600 702 728 647 576 384 879 70 835 67 297 265 675 237 63 665 662 777 227 647 655 837 81 664 555 537 721 250 485 948 86 539 251 876 561 213 973 288 824 56 485 321 948 86 166 398 212 455 406 25 423 384 879 219 522 586 362 59 432 924 866 586 668 167 655 837 81 198 347 376 955 53 198 711 510 297 265 675 237 307 128 665 991 73 172 871 877 384 879 196 166 503 161 523 793 403 794 244 583 15 822 89 194 664 817 146 283 352 385 343 44 902 752 63 644 254 823 175 684 136 233 233 390 479 422 330 776 333 873 347 975 59 319 263 501 716 205 521 453 384 761 879 70 219 952 315 471 737 910 333 234 161 523 50 910 321 948 86 781 645 655 837 81 664 990 107 233 258 436 635 803 791 894 382 350 836 494 87 513 296 714 187 594 461 969 565 734 870 290 978 824 333 32 835 683 67 940 337 126 107 233 535 935 101 387 741 908 246 764 611 916 506 107 417 755 193 415 772 497 63 644 254 594 310 540 295 76 614 803 791 52 524 44 63 665 662 213 973 288 796 750 104 837 81 327 635 579 764 466 969 663 523 185 403 75 583 874 167 655 837 81 198 711 683 940 884 244 583 576 761 907 430 70 835 67 940 118 545 85 297 265 675 237 63 665 780 519 26 204 280 576 384 879 945 185 233 156 824 442 56 284 327 635 259 303 333 432 32 683 940 118 702 15 333 487 990 29 561 537 416 836 908 693 205 521 711 510 297 675 237 823 175 684 136 38 105 244 583 576 822 89 664 990 107 233 156 824 384 879 487 350 836 74 228 259 453 402 663 969 870 251 290 978 426 647 822 89 194 664 990 107 545 85 297 884 79 868 220 470 821 576 693 268 876 29 73 889 338 359 877 384 761 907 430 933 179 961 428 333 523 555 705 519 589 600 702 728 647 576 384 879 377 70 835 67 297 265 675 415 772 497\n<class 'str'>",
"output": {
"audio": "https://replicate.delivery/pbxt/ZoR9ogxyh8ZUCdeFQxJpnSJrsX2DoSAaCaKf50BDCN0AulfmA/out.wav",
"text": "To deal with stress, try deep breathing exercises, meditation, and physical activity like yoga or a brisk walk. Also, prioritize tasks, set realistic goals, and take regular breaks to help manage stress."
},
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2024-09-22T23:34:09.369Z",
"started_at": "2024-09-22T23:34:09.466898Z",
"completed_at": "2024-09-22T23:34:25.923573Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/7kxhnhz2v5rgm0cj3gar5s5qc8/cancel",
"get": "https://api.replicate.com/v1/predictions/7kxhnhz2v5rgm0cj3gar5s5qc8",
"web": "https://replicate.com/p/7kxhnhz2v5rgm0cj3gar5s5qc8"
},
"metrics": {
"predict_time": 16.456674207,
"total_time": 16.554573
}
}