Updating the view thread component

We are going to update client\app\view-thread\view-thread.component.html by adding the relevant response information. Add the following snippet after we display the segment LabelAnnotations:

// SNIPP SNIPP<!-- Sentiment --><div *ngIf="message.nlpDocumentSentiment"> <b>Sentiment</b>: <label class="badge badge-pill badge-success" *ngIf="message.nlpDocumentSentiment.score > 0.1"> Positive </label> <label class="badge badge-pill badge-info" *ngIf="message.nlpDocumentSentiment.score === 0"> Neutral </label> <label class="badge badge-pill badge-danger" *ngIf="message.nlpDocumentSentiment.score < 0.1"> Negative </label></div><!-- Catgories --><div *ngIf="message.nlpCategories.length > 0"> <b>Categories</b>: <label ...

Get Google Cloud AI Services Quick Start Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.