Spaces:
Runtime error
Runtime error
Commit
·
194036f
1
Parent(s):
45dade0
use board_url instead of local
Browse files
plumber.R
CHANGED
@@ -7,15 +7,16 @@ library(vetiver)
|
|
7 |
|
8 |
# Packages needed to generate model predictions
|
9 |
if (FALSE) {
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
}
|
15 |
-
|
|
|
16 |
v <- vetiver_pin_read(b, "penguins_model")
|
17 |
|
18 |
#* @plumber
|
19 |
function(pr) {
|
20 |
-
|
21 |
-
}
|
|
|
7 |
|
8 |
# Packages needed to generate model predictions
|
9 |
if (FALSE) {
|
10 |
+
library(parsnip)
|
11 |
+
library(recipes)
|
12 |
+
library(stats)
|
13 |
+
library(workflows)
|
14 |
}
|
15 |
+
pin_loc <- pins:::github_raw("JamesHWade/r-mlops/main/pins-r/_pins.yaml")
|
16 |
+
b <- board_url(pin_loc)
|
17 |
v <- vetiver_pin_read(b, "penguins_model")
|
18 |
|
19 |
#* @plumber
|
20 |
function(pr) {
|
21 |
+
pr %>% vetiver_api(v)
|
22 |
+
}
|