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:170cfd0b56fb97ed732c815431e52546efac47b8a2b0096d58dd40b099191e01",
{
input: {
audio: "https://replicate.delivery/pbxt/JosNxmt74AOVcCi1uwCHKFJR1jvzi7U2ffKcUPUFUz9J1z1b/07%20-%20The%20Enemy.mp3",
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:170cfd0b56fb97ed732c815431e52546efac47b8a2b0096d58dd40b099191e01",
input={
"audio": "https://replicate.delivery/pbxt/JosNxmt74AOVcCi1uwCHKFJR1jvzi7U2ffKcUPUFUz9J1z1b/07%20-%20The%20Enemy.mp3",
"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:170cfd0b56fb97ed732c815431e52546efac47b8a2b0096d58dd40b099191e01",
"input": {
"audio": "https://replicate.delivery/pbxt/JosNxmt74AOVcCi1uwCHKFJR1jvzi7U2ffKcUPUFUz9J1z1b/07%20-%20The%20Enemy.mp3",
"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-04T18:08:22.028391Z",
"created_at": "2023-11-04T18:08:05.361577Z",
"data_removed": false,
"error": null,
"id": "fn2yrujbnqrudkjmv5sigwmyla",
"input": {
"audio": "https://replicate.delivery/pbxt/JosNxmt74AOVcCi1uwCHKFJR1jvzi7U2ffKcUPUFUz9J1z1b/07%20-%20The%20Enemy.mp3",
"top_n": 10,
"output_format": "Visualization"
},
"logs": "loading audio...\nrunning the model...\nplotting...\n2023-11-04 18:08:12.037336: W tensorflow/core/grappler/optimizers/loop_optimizer.cc:906] Skipping loop optimization for Merge node with control input: StatefulPartitionedCall/StatefulPartitionedCall/assert_equal_193/Assert/AssertGuard/branch_executed/_1407\n2023-11-04 18:08:20.984002: 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 18:08:20.985428: 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 18:08:20.986119: 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 18:08:20.987442: 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 18:08:20.988540: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1871] Adding visible gpu devices: 0\n2023-11-04 18:08:20.988584: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1258] Device interconnect StreamExecutor with strength 1 edge matrix:\n2023-11-04 18:08:20.988594: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1264] 0\n2023-11-04 18:08:20.988602: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1277] 0: N\n2023-11-04 18:08:20.988783: 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 18:08:20.990431: 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 18:08:20.991548: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1418] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 13421 MB memory) -> physical GPU (device: 0, name: Tesla T4, pci bus id: 0000:00:05.0, compute capability: 7.5)\n/root/.pyenv/versions/3.10.13/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/root/.pyenv/versions/3.10.13/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/root/.pyenv/versions/3.10.13/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": 16.69758,
"total_time": 16.666814
},
"output": "https://replicate.delivery/pbxt/jBekyAv1ExXUVac0vcvVaJdaZoJ6K6IRWpcKSPyFoczK1h6IA/out.png",
"started_at": "2023-11-04T18:08:05.330811Z",
"status": "succeeded",
"urls": {
"get": "https://api.replicate.com/v1/predictions/fn2yrujbnqrudkjmv5sigwmyla",
"cancel": "https://api.replicate.com/v1/predictions/fn2yrujbnqrudkjmv5sigwmyla/cancel"
},
"version": "170cfd0b56fb97ed732c815431e52546efac47b8a2b0096d58dd40b099191e01"
}
loading audio...
running the model...
plotting...
2023-11-04 18:08:12.037336: W tensorflow/core/grappler/optimizers/loop_optimizer.cc:906] Skipping loop optimization for Merge node with control input: StatefulPartitionedCall/StatefulPartitionedCall/assert_equal_193/Assert/AssertGuard/branch_executed/_1407
2023-11-04 18:08:20.984002: 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 18:08:20.985428: 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 18:08:20.986119: 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 18:08:20.987442: 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 18:08:20.988540: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1871] Adding visible gpu devices: 0
2023-11-04 18:08:20.988584: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1258] Device interconnect StreamExecutor with strength 1 edge matrix:
2023-11-04 18:08:20.988594: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1264] 0
2023-11-04 18:08:20.988602: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1277] 0: N
2023-11-04 18:08:20.988783: 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 18:08:20.990431: 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 18:08:20.991548: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1418] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 13421 MB memory) -> physical GPU (device: 0, name: Tesla T4, pci bus id: 0000:00:05.0, compute capability: 7.5)
/root/.pyenv/versions/3.10.13/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):
/root/.pyenv/versions/3.10.13/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):
/root/.pyenv/versions/3.10.13/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!