Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

fix issue s

Abhinavb6f0ee5b2e17
diff --git a/src/api/clip.ts b/src/api/clip.ts
index 731551e2b0..2e37a97e65 100644
--- a/src/api/clip.ts
+++ b/src/api/clip.ts
@@ -16,7 +16,7 @@ export async function computeImageEmbedding(
const embedding = await ipcRenderer.invoke(
'compute-image-embedding',
model,
- imageData
+ tempInputFilePath
);
return embedding;
} catch (err) {
diff --git a/src/services/clipService.ts b/src/services/clipService.ts
index c77721cbdc..cf8cd14a51 100644
--- a/src/services/clipService.ts
+++ b/src/services/clipService.ts
@@ -275,12 +275,12 @@ export async function computeONNXImageEmbedding(
export async function computeTextEmbedding(
model: Model,
- inputFilePath: string
+ text: string
): Promise<Float32Array> {
if (model === Model.GGML_CLIP) {
- return await computeGGMLTextEmbedding(inputFilePath);
+ return await computeGGMLTextEmbedding(text);
} else {
- return await computeONNXTextEmbedding(inputFilePath);
+ return await computeONNXTextEmbedding(text);
}
}