Read blog post about the project.
If you don't have an Anyscale account, you can register here.
If you already have an account, login here.
Once you are logged in, go to workspaces by clicking the "Workspaces" tab on the left side of the home screen:
Create a new workspace by clicking the "Create Workspace" button:
Specify Workspace details as displayed below and click "Create":
Wait for the workspace to be created:
(this can take up to one minute)
Note
Your workspace is ready!
Open the terminal in the workspace and clone the repository by running the following command:
git clone https://github.com/anyscale/cross-modal-search-ecommerce-project.git
Go to the project directory:
cd cross-modal-search-ecommerce-project
You'll need Pinecone index. You can register or login using this link.
Set the Pinecone API key as an environment variable under the Dependencies section of the workspace
Set the Pinecone API key in the embeddings/job.yaml
file
name: calc-embeddings
entrypoint: python embeddings/main.py --mode img --model-name openai #choose model from [openai, fashionclip], choose mode from [img, txt]
runtime_env:
working_dir: .
pip: embeddings/requirements.txt
env_vars:
PINECONE_API_KEY: <your pinecone api key> # set your pinecone api key here
Submit the job to generate embeddings by running the following command in your workspace terminal:
make anyscale-job-embeddings
Update the mode and model name in the embeddings/job.yaml
file to generate embeddings for img
and txt
modes and openai
and fashionclip
models. For each mode and model combination, submit a new job by running the following command.
It should be a total of 4 jobs that need to be submitted.
Check the status of each job by visiting the Anyscale Job interface
Deploy the application by running the following command
make deploy-app
Check the status of the deployment by visiting the
Visit the Application URL to see the application. You can find the URL under the service "Query" dropdown.
Query the application by entering a query in the search bar and clicking the search button
Created with