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.
Follow the instructions below to run the demo locally.
Enable the Vertex AI APIs and install the gcloud CLI.
Follow the WCS quickstart instructions to register an account and deploy a cluster.
-
Clone the project repository.
git clone https://github.com/sis0k0/books-whisperer.git
-
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>'
-
Get your Weaviate credentials from the WCS cluster page.
-
Run the following
gcloud
command to generate an access token.gcloud auth print-access-token
-
Run the following
gcloud
command to get your project ID.gcloud config get-value project
-
Install the dependencies in the
server/
directory. books-whisperer/servernpm install
-
Vectorize and import the sample dataset.
books-whisperer/server
node ./src/importData.js
-
Start the server app.
books-whisperer/server
npm start
-
Open a new terminal window, install the dependencies in the
client/
directory and start the client app.books-whisperer/client
npm i && npm start
-
Open the browser at
https://localhost:4200
and search for books!