Namespace: Recommender

Recommender

Methods

(async, static) getRecommendedBooks(base64, setRecBooks, setLoading)

Processes an image of books and returns a recommended subset of those books. This function accepts a Base64 encoding of an image of books and uses the Cloud Vision API to pull a list of detected titles, the Google Books API to match the (possibly erroneous) detected text with actual book titles, and our in-house Recommendation server to select a possibly empty subset of the detected titles to recommend to the user. Because of the asynchronous nature of this process, instead of returning data, this function instead uses callbacks to modify the UI state.
Parameters:
Name Type Description
base64 string The Base64 encoding of the image to be processed.
setRecBooks bookListCallback A React state modifier callback to set the list of recommended books.
setLoading loadingCallback A React state modifier callback to set loading status.
Source: