Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

implemented a simple AI-model integration pipeline #14

Merged
merged 2 commits into from
Feb 24, 2025

Conversation

ramezmosad
Copy link
Collaborator

Fixes #11

What was changed?
Introduced a client-side AI model integration that lets users upload an image and receive relevant search results based on visual similarity. The application now runs a Hugging Face model entirely in the browser, computes image embeddings, and compares them to a small set of reference images to generate results. (or at least this is the goal)

Why was it changed?
We needed a generic and easily maintainable way to integrate AI models into the app without relying on a separate backend. This ensures that we can swap in different models or pipelines with minimal effort, while meeting the requirement of handling images on the client and returning relevant search results.

How was it changed?
A local inference pipeline was added that downloads and runs a pre-trained model (CLIP) in the user’s browser. When an image is uploaded, it will be converted into an embedding, normalized, and compared to precomputed embeddings of reference images to determine similarity. This approach keeps the logic entirely on the client side, removing any dependency on external servers or APIs for model inference.

NOTE this implementation might change before merging

@ramezmosad ramezmosad linked an issue Feb 16, 2025 that may be closed by this pull request
2 tasks
@MeghPatel6 MeghPatel6 self-requested a review February 17, 2025 22:25
Copy link
Collaborator

@MeghPatel6 MeghPatel6 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! Good Work.

@smallrussian smallrussian merged commit 44f0e65 into main Feb 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Integrate AI Model
3 participants