xxxxxxxxxx
35
// Note: this sketch consists of additional JavaScript
// files. Make sure to duplicate it, rather than copying
// and pasting code :)
let replicate_api_proxy = "https://splashy-rambunctious-leader.glitch.me/";
function setup() {
createCanvas(400, 400);
requestReplicate(
"POST",
"/v1/models/meta/llama-2-7b/versions/527827021d8756c7ab79fde0abbfaac885c37a3ed5fe23c7465093f0878d55ef/trainings",
{
input: {
train_data: "URL_OF_YOUR_DATASET_JSONL",
num_train_epochs: 3,
},
destination: "NAME_OF_YOUR_REPLICATE_MODEL",
},
gotResponse);
}
}
function gotResponse(results, params) {
if (typeof results == "object" && results.version) {
console.log("Model will be created as " + params.destination + ":" + results.version + " (copy this)");
} else {
console.log(results);
}
}
function draw() {
background(220);
}