Skip to content

Latest commit

 

History

History
52 lines (40 loc) · 1.73 KB

developer_guide.md

File metadata and controls

52 lines (40 loc) · 1.73 KB

Mosaic Developer Guide

Building from Scratch

Backend

To deploy your own conditional image retrieval search index please follow these steps

  1. Download Image Metadata:

    wget https://mmlsparkdemo.blob.core.windows.net/cknn/metadata.json?sv=2019-02-02&st=2020-07-23T02%3A22%3A30Z&se=2023-07-24T02%3A22%3A00Z&sr=b&sp=r&sig=hDnGw9y%2BO5XlggL6br%2FPzSKmpAdUZ%2F1LJKVkcmbVmCE%3D
  2. Download Images:

    cd data_prep
    python download_images.py 
  3. Featurize and perform Conditional Image Retrieval on every image

    cd data_prep
    python featurize_and_match.py 
  4. Write enriched information to an Azure Search Index.

    More detailed code coming soon, Follow the closely related guide for a similiar example.

Frontend

To build a copy of the mosaic website locally please use the following. Note that the introductory animations were made and deployed using a different framework.

Development

  1. Install npm if you dont already have it. You can find instructions at https://nodejs.org/.
  2. Install dependencies:
    cd frontend
    npm install
  3. Start the development server:
    npm start
  4. Navigate to http://localhost:3000/art to explore the local website.

Deployment

  1. run npm run build to create a optimized build
  2. Copy frontend/utils/404.html file to the frontend/build directory
  3. In frontend/build/index.html, between the noscript and script tags (right after the root div), copy in the script from frontend/utils/singe_page_app.txt
  4. run npm run deploy to push the build to github pages