Skip to content

Commit 18d00d3

Browse files
committed
increase cutoff
1 parent 3823179 commit 18d00d3

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

app/lib/generateSeedPlaylist.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ export async function generateSeedPlaylist(
119119

120120
// we want to avoid low quality recommendations so we check each song against all seeds(selected songs) put that into an array and sort by the number of seeds that match the treshold then return the top 100
121121
// we also want to avoid songs that are too far in similarity to the seeds so we set a cutoff of 0.2 below the threshold to give extra grace
122-
const CUTOFF = THRESHOLD - 0.2
122+
const CUTOFF = THRESHOLD - 0.25
123123

124124
const scoredTracks = await Promise.all(
125125
aiTracks.map(track => limit(async () => {

app/lib/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ export const getAllTracks = async (
7777
removeEmptyObjects.forEach((subarray) => {
7878
for (let i = 0; i < numTracks; i++) {
7979
const randomIndex = Math.floor(Math.random() * subarray.length);
80-
const randomTrack = subarray.splice(randomIndex, 2)[0];
80+
const randomTrack = subarray.splice(randomIndex, 1)[0];
8181
result.push(randomTrack);
8282
}
8383
});

0 commit comments

Comments
 (0)