Skip to content

sis0k0/books-whisperer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Books Whisperer — Semantic Book Search Recommendations

This is a demo of a books recommendations web application using Weaviate and Google Cloud PaLM 2. The project uses Node.js with express for the server application and Angular for the client application.

Setup

Follow the instructions below to run the demo locally.

Google Cloud setup

Enable the Vertex AI APIs and install the gcloud CLI.

Weaviate Cloud Services setup

Follow the WCS quickstart instructions to register an account and deploy a cluster.

Project setup

  1. Clone the project repository.

    git clone https://github.com/sis0k0/books-whisperer.git
    
  2. Navigate to the server directory and create a .env file with the following content. Replace the placeholders with your own credentials.

    books-whisperer/server/.env

    WEAVIATE_HOST='<host-name>.weaviate.network'
    WEAVIATE_API_KEY='<api-key>'
    
    PALM_TOKEN='<token>'
    GOOGLE_CLOUD_PROJECT_ID='<project-id>'
    
  3. Get your Weaviate credentials from the WCS cluster page.

  4. Run the following gcloud command to generate an access token.

    gcloud auth print-access-token
    
  5. Run the following gcloud command to get your project ID.

    gcloud config get-value project
    

Loading the data and running the application

  1. Install the dependencies in the server/ directory. books-whisperer/server

    npm install
    
  2. Vectorize and import the sample dataset.

    books-whisperer/server

    node ./src/importData.js
    
  3. Start the server app.

    books-whisperer/server

    npm start
    
  4. Open a new terminal window, install the dependencies in the client/ directory and start the client app.

    books-whisperer/client

    npm i && npm start
    
  5. Open the browser at http://localhost:4200 and search for books!

    Books whisperer demonstration