Skip to content

Commit 53a59e2

Browse files
committed
fix: average text embedding time calculation
1 parent 8e0250a commit 53a59e2

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • apps/text-embeddings/app/clip-embeddings

apps/text-embeddings/app/clip-embeddings/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ function ClipEmbeddingsScreen() {
9797
similarity: dotProduct(imageEmbedding, textEmbedding),
9898
});
9999
}
100-
setTextEmbeddingTime(Date.now() - txtStart);
100+
setTextEmbeddingTime(Math.round((Date.now() - txtStart) / labels.length));
101101

102102
scored.sort((a, b) => b.similarity - a.similarity);
103103
setResults(scored);

0 commit comments

Comments
 (0)