Added neural block mock

This commit is contained in:
Ajay Ramachandran
2020-04-30 19:13:42 -04:00
parent 0cf84612e9
commit a278036f1d
5 changed files with 21 additions and 6 deletions

View File

@@ -116,10 +116,12 @@ async function autoModerateSubmission(videoID, segments) {
return "One of your submitted segments is over 80% of the video.";
}
}
let neuralBlockURL = config.neuralBlockURL || "https://ai.neuralblock.app";
let overlap = false;
let response = await fetch("https://ai.neuralblock.app/api/getSponsorSegments?vid=" + videoID);
let response = await fetch(neuralBlockURL + "/api/getSponsorSegments?vid=" + videoID);
if (!response.ok) return false;
let nbPredictions = await response.json();