Failed to load versions. Head to the versions page to see all versions for this model.
You're looking at a specific version of this model. Jump to the model overview.
Input
Run this model in Node.js with one line of code:
npm install replicate
REPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
import Replicate from "replicate";
const replicate = new Replicate({
auth: process.env.REPLICATE_API_TOKEN,
});
Run mtg/maest using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"mtg/maest:42a8990333282beb949122de38f3a91a7f910ecc2ad4f0a881c9ce8397fbcd19",
{
input: {
url: "https://www.youtube.com/watch?v=LclGelDVnac",
top_n: 10,
output_format: "Visualization"
}
}
);
// To access the file URL:
console.log(output.url()); //=> "http://example.com"
// To write the file to disk:
fs.writeFile("my-image.png", 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=<paste-your-token-here>
Find your API token in your account settings.
import replicate
Run mtg/maest using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"mtg/maest:42a8990333282beb949122de38f3a91a7f910ecc2ad4f0a881c9ce8397fbcd19",
input={
"url": "https://www.youtube.com/watch?v=LclGelDVnac",
"top_n": 10,
"output_format": "Visualization"
}
)
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=<paste-your-token-here>
Find your API token in your account settings.
Run mtg/maest 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": "mtg/maest:42a8990333282beb949122de38f3a91a7f910ecc2ad4f0a881c9ce8397fbcd19",
"input": {
"url": "https://www.youtube.com/watch?v=LclGelDVnac",
"top_n": 10,
"output_format": "Visualization"
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Add a payment method to run this model.
By signing in, you agree to our
terms of service and privacy policy
Output
{
"completed_at": "2023-11-04T15:30:39.591906Z",
"created_at": "2023-11-04T15:28:33.588401Z",
"data_removed": false,
"error": null,
"id": "2aofxxrcexjvrf76kyr2u5xmgq",
"input": {
"url": "https://www.youtube.com/watch?v=LclGelDVnac",
"top_n": 10,
"output_format": "Visualization"
},
"logs": "[youtube] LclGelDVnac: Downloading webpage\n[youtube] LclGelDVnac: Downloading player 9d15588c\n[dashsegments] Total fragments: 1\n[download] Destination: /tmp/tmpt564hijc/audio.webm\n[download] 0.0% of ~3.15MiB at 15.11KiB/s ETA 03:33\n[download] 0.1% of ~3.15MiB at 45.22KiB/s ETA 01:11\n[download] 0.2% of ~3.15MiB at 104.79KiB/s ETA 00:30\n[download] 0.5% of ~3.15MiB at 223.18KiB/s ETA 00:14\n[download] 1.0% of ~3.15MiB at 458.29KiB/s ETA 00:06\n[download] 2.0% of ~3.15MiB at 915.05KiB/s ETA 00:03\n[download] 3.9% of ~3.15MiB at 1.76MiB/s ETA 00:01\n[download] 7.9% of ~3.15MiB at 3.44MiB/s ETA 00:00\n[download] 15.8% of ~3.15MiB at 6.72MiB/s ETA 00:00\n[download] 31.7% of ~3.15MiB at 13.07MiB/s ETA 00:00\n[download] 63.5% of ~3.15MiB at 25.12MiB/s ETA 00:00\n[download] 100.0% of ~3.15MiB at 11.44MiB/s ETA 00:00\n[download] 100.0% of ~3.15MiB at 11.41MiB/s ETA 00:00\n[download] 100% of 3.15MiB in 00:00\n[ffmpeg] Destination: /tmp/tmpt564hijc/audio.wav\nDeleting original file /tmp/tmpt564hijc/audio.webm (pass -k to keep)\nloading audio...\nrunning the model...\nplotting...\n2023-11-04 15:30:04.017105: I tensorflow/core/platform/profile_utils/cpu_utils.cc:114] CPU Frequency: 2199995000 Hz\n2023-11-04 15:30:09.659050: W tensorflow/core/grappler/optimizers/loop_optimizer.cc:906] Skipping loop optimization for Merge node with control input: StatefulPartitionedCall/StatefulPartitionedCall/assert_equal_177/Assert/AssertGuard/branch_executed/_1327\n2023-11-04 15:30:17.716207: W tensorflow/core/framework/cpu_allocator_impl.cc:80] Allocation of 136282800 exceeds 10% of free system memory.\n2023-11-04 15:30:18.018761: W tensorflow/core/framework/cpu_allocator_impl.cc:80] Allocation of 136282800 exceeds 10% of free system memory.\n2023-11-04 15:30:18.320289: W tensorflow/core/framework/cpu_allocator_impl.cc:80] Allocation of 136282800 exceeds 10% of free system memory.\n2023-11-04 15:30:18.605200: W tensorflow/core/framework/cpu_allocator_impl.cc:80] Allocation of 136282800 exceeds 10% of free system memory.\n2023-11-04 15:30:18.891654: W tensorflow/core/framework/cpu_allocator_impl.cc:80] Allocation of 136282800 exceeds 10% of free system memory.\n2023-11-04 15:30:38.754365: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:937] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n2023-11-04 15:30:38.756447: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1733] Found device 0 with properties:\npciBusID: 0000:00:05.0 name: Tesla T4 computeCapability: 7.5\ncoreClock: 1.59GHz coreCount: 40 deviceMemorySize: 14.58GiB deviceMemoryBandwidth: 298.08GiB/s\n2023-11-04 15:30:38.756486: W tensorflow/core/common_runtime/gpu/gpu_device.cc:1766] Cannot dlopen some GPU libraries. Please make sure the missing libraries mentioned above are installed properly if you would like to use GPU. Follow the guide at https://www.tensorflow.org/install/gpu for how to download and setup the required libraries for your platform.\nSkipping registering GPU devices...\n2023-11-04 15:30:38.756508: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1258] Device interconnect StreamExecutor with strength 1 edge matrix:\n2023-11-04 15:30:38.756517: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1264] 0\n2023-11-04 15:30:38.756545: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1277] 0: N\n/usr/local/lib/python3.10/site-packages/seaborn/_core.py:1225: FutureWarning: is_categorical_dtype is deprecated and will be removed in a future version. Use isinstance(dtype, CategoricalDtype) instead\nif pd.api.types.is_categorical_dtype(vector):\n/usr/local/lib/python3.10/site-packages/seaborn/_core.py:1225: FutureWarning: is_categorical_dtype is deprecated and will be removed in a future version. Use isinstance(dtype, CategoricalDtype) instead\nif pd.api.types.is_categorical_dtype(vector):\n/usr/local/lib/python3.10/site-packages/seaborn/_core.py:1225: FutureWarning: is_categorical_dtype is deprecated and will be removed in a future version. Use isinstance(dtype, CategoricalDtype) instead\nif pd.api.types.is_categorical_dtype(vector):\ndone!",
"metrics": {
"predict_time": 44.50581,
"total_time": 126.003505
},
"output": "https://replicate.delivery/pbxt/ndSUKssBlFZmPhsnDAs7Byb9HnYDjqaTY8PPPtVYpC2nVQdE/out.png",
"started_at": "2023-11-04T15:29:55.086096Z",
"status": "succeeded",
"urls": {
"get": "https://api.replicate.com/v1/predictions/2aofxxrcexjvrf76kyr2u5xmgq",
"cancel": "https://api.replicate.com/v1/predictions/2aofxxrcexjvrf76kyr2u5xmgq/cancel"
},
"version": "42a8990333282beb949122de38f3a91a7f910ecc2ad4f0a881c9ce8397fbcd19"
}
[youtube] LclGelDVnac: Downloading webpage
[youtube] LclGelDVnac: Downloading player 9d15588c
[dashsegments] Total fragments: 1
[download] Destination: /tmp/tmpt564hijc/audio.webm
[download] 0.0% of ~3.15MiB at 15.11KiB/s ETA 03:33
[download] 0.1% of ~3.15MiB at 45.22KiB/s ETA 01:11
[download] 0.2% of ~3.15MiB at 104.79KiB/s ETA 00:30
[download] 0.5% of ~3.15MiB at 223.18KiB/s ETA 00:14
[download] 1.0% of ~3.15MiB at 458.29KiB/s ETA 00:06
[download] 2.0% of ~3.15MiB at 915.05KiB/s ETA 00:03
[download] 3.9% of ~3.15MiB at 1.76MiB/s ETA 00:01
[download] 7.9% of ~3.15MiB at 3.44MiB/s ETA 00:00
[download] 15.8% of ~3.15MiB at 6.72MiB/s ETA 00:00
[download] 31.7% of ~3.15MiB at 13.07MiB/s ETA 00:00
[download] 63.5% of ~3.15MiB at 25.12MiB/s ETA 00:00
[download] 100.0% of ~3.15MiB at 11.44MiB/s ETA 00:00
[download] 100.0% of ~3.15MiB at 11.41MiB/s ETA 00:00
[download] 100% of 3.15MiB in 00:00
[ffmpeg] Destination: /tmp/tmpt564hijc/audio.wav
Deleting original file /tmp/tmpt564hijc/audio.webm (pass -k to keep)
loading audio...
running the model...
plotting...
2023-11-04 15:30:04.017105: I tensorflow/core/platform/profile_utils/cpu_utils.cc:114] CPU Frequency: 2199995000 Hz
2023-11-04 15:30:09.659050: W tensorflow/core/grappler/optimizers/loop_optimizer.cc:906] Skipping loop optimization for Merge node with control input: StatefulPartitionedCall/StatefulPartitionedCall/assert_equal_177/Assert/AssertGuard/branch_executed/_1327
2023-11-04 15:30:17.716207: W tensorflow/core/framework/cpu_allocator_impl.cc:80] Allocation of 136282800 exceeds 10% of free system memory.
2023-11-04 15:30:18.018761: W tensorflow/core/framework/cpu_allocator_impl.cc:80] Allocation of 136282800 exceeds 10% of free system memory.
2023-11-04 15:30:18.320289: W tensorflow/core/framework/cpu_allocator_impl.cc:80] Allocation of 136282800 exceeds 10% of free system memory.
2023-11-04 15:30:18.605200: W tensorflow/core/framework/cpu_allocator_impl.cc:80] Allocation of 136282800 exceeds 10% of free system memory.
2023-11-04 15:30:18.891654: W tensorflow/core/framework/cpu_allocator_impl.cc:80] Allocation of 136282800 exceeds 10% of free system memory.
2023-11-04 15:30:38.754365: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:937] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2023-11-04 15:30:38.756447: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1733] Found device 0 with properties:
pciBusID: 0000:00:05.0 name: Tesla T4 computeCapability: 7.5
coreClock: 1.59GHz coreCount: 40 deviceMemorySize: 14.58GiB deviceMemoryBandwidth: 298.08GiB/s
2023-11-04 15:30:38.756486: W tensorflow/core/common_runtime/gpu/gpu_device.cc:1766] Cannot dlopen some GPU libraries. Please make sure the missing libraries mentioned above are installed properly if you would like to use GPU. Follow the guide at https://www.tensorflow.org/install/gpu for how to download and setup the required libraries for your platform.
Skipping registering GPU devices...
2023-11-04 15:30:38.756508: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1258] Device interconnect StreamExecutor with strength 1 edge matrix:
2023-11-04 15:30:38.756517: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1264] 0
2023-11-04 15:30:38.756545: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1277] 0: N
/usr/local/lib/python3.10/site-packages/seaborn/_core.py:1225: FutureWarning: is_categorical_dtype is deprecated and will be removed in a future version. Use isinstance(dtype, CategoricalDtype) instead
if pd.api.types.is_categorical_dtype(vector):
/usr/local/lib/python3.10/site-packages/seaborn/_core.py:1225: FutureWarning: is_categorical_dtype is deprecated and will be removed in a future version. Use isinstance(dtype, CategoricalDtype) instead
if pd.api.types.is_categorical_dtype(vector):
/usr/local/lib/python3.10/site-packages/seaborn/_core.py:1225: FutureWarning: is_categorical_dtype is deprecated and will be removed in a future version. Use isinstance(dtype, CategoricalDtype) instead
if pd.api.types.is_categorical_dtype(vector):
done!