feat(server): CLIP search integration (#1939)

This commit is contained in:
Alex
2023-03-18 08:44:42 -05:00
committed by GitHub
parent 0d436db3ea
commit f56eaae019
46 changed files with 673 additions and 773 deletions

View File

@@ -14,4 +14,12 @@ export class MachineLearningRepository implements IMachineLearningRepository {
detectObjects(input: MachineLearningInput): Promise<string[]> {
return client.post<string[]>('/object-detection/detect-object', input).then((res) => res.data);
}
encodeImage(input: MachineLearningInput): Promise<number[]> {
return client.post<number[]>('/sentence-transformer/encode-image', input).then((res) => res.data);
}
encodeText(input: string): Promise<number[]> {
return client.post<number[]>('/sentence-transformer/encode-text', { text: input }).then((res) => res.data);
}
}