Skip to content

Commit

Permalink
Update tutorial.Rmd
Browse files Browse the repository at this point in the history
  • Loading branch information
davidycliao committed Dec 30, 2024
1 parent 70c886c commit 18a5353
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions vignettes/tutorial.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -1524,7 +1524,6 @@ It's important to verify your model's compatibility with `$model_card`. You can

```{r}
print(classifier$model_card)
```

```{r}
Expand All @@ -1547,13 +1546,23 @@ sentence <- Sentence("And to boost the housing we need, we will start to build a
# Make prediction
classifier$predict(sentence)
# Access prediction results
prediction <- sentence$labels[[1]]$value # Get predicted label
confidence <- sentence$labels[[1]]$score # Get confidence score
```

&nbsp;
<u>**Access Prediction Results**</u>

Get predicted label
```{r}
prediction <- sentence$labels[[1]]$value
print(prediction)
```

Get confidence score
```{r}
confidence <- sentence$labels[[1]]$score
print(confidence)
```

&nbsp;
-----


Expand Down

0 comments on commit 18a5353

Please sign in to comment.