You're looking at a specific version of this model. Jump to the model overview.
mtg /music-approachability-engagement:a8816edf
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/music-approachability-engagement using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"mtg/music-approachability-engagement:a8816edfa80405aa841c0721cc1d5f722ac949744007dd66660218b6e8933c97",
{
input: {
audio: "https://replicate.delivery/mgxm/3a90482a-2a14-435d-8c26-7cb5cb44b5d8/edm.mp3",
model_type: "2 classes"
}
}
);
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=<paste-your-token-here>
Find your API token in your account settings.
import replicate
Run mtg/music-approachability-engagement using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"mtg/music-approachability-engagement:a8816edfa80405aa841c0721cc1d5f722ac949744007dd66660218b6e8933c97",
input={
"audio": "https://replicate.delivery/mgxm/3a90482a-2a14-435d-8c26-7cb5cb44b5d8/edm.mp3",
"model_type": "2 classes"
}
)
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/music-approachability-engagement 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": "a8816edfa80405aa841c0721cc1d5f722ac949744007dd66660218b6e8933c97",
"input": {
"audio": "https://replicate.delivery/mgxm/3a90482a-2a14-435d-8c26-7cb5cb44b5d8/edm.mp3",
"model_type": "2 classes"
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
Rendering markdown...
{
"completed_at": "2023-05-25T10:38:50.933346Z",
"created_at": "2023-05-25T10:38:45.484927Z",
"data_removed": false,
"error": null,
"id": "fw5w4a7xh5a6vidqyu33y6et3i",
"input": {
"audio": "https://replicate.delivery/mgxm/3a90482a-2a14-435d-8c26-7cb5cb44b5d8/edm.mp3",
"model_type": "2 classes"
},
"logs": "loading audio...\nrunning classification heads...\n[ INFO ] TensorflowPredict: Successfully loaded graph file: `/models/approachability-2class.pb`\n[ INFO ] TensorflowPredict: Successfully loaded graph file: `/models/engagement-2class.pb`\ndone!",
"metrics": {
"predict_time": 5.508027,
"total_time": 5.448419
},
"output": "https://replicate.delivery/pbxt/HSePfdMxmGvz00quRIWOw8YQHMPEg6g2CnVYNUx9HsB6yOfhA/out.md",
"started_at": "2023-05-25T10:38:45.425319Z",
"status": "succeeded",
"urls": {
"get": "https://api.replicate.com/v1/predictions/fw5w4a7xh5a6vidqyu33y6et3i",
"cancel": "https://api.replicate.com/v1/predictions/fw5w4a7xh5a6vidqyu33y6et3i/cancel"
},
"version": "a8816edfa80405aa841c0721cc1d5f722ac949744007dd66660218b6e8933c97"
}
loading audio...
running classification heads...
[ INFO ] TensorflowPredict: Successfully loaded graph file: `/models/approachability-2class.pb`
[ INFO ] TensorflowPredict: Successfully loaded graph file: `/models/engagement-2class.pb`
done!