Spaces:
Runtime error
Runtime error
try to get a better stack trace by. loading the model in the main process.
Browse files
app.R
CHANGED
@@ -16,6 +16,14 @@ system_prompt = "<|SYSTEM|># StableLM Tuned (Alpha version)
|
|
16 |
- StableLM will refuse to participate in anything that could harm a human.
|
17 |
"
|
18 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
19 |
ui <- page_fillable(
|
20 |
theme = bs_theme(bootswatch = "minty"),
|
21 |
shinyjs::useShinyjs(),
|
|
|
16 |
- StableLM will refuse to participate in anything that could harm a human.
|
17 |
"
|
18 |
|
19 |
+
library(torch)
|
20 |
+
library(zeallot)
|
21 |
+
library(minhub)
|
22 |
+
model <<- minhub::gptneox_from_pretrained(repo)
|
23 |
+
model$eval()
|
24 |
+
model$to(dtype = torch_float())
|
25 |
+
tok <<- tok::tokenizer$from_pretrained(repo)
|
26 |
+
|
27 |
ui <- page_fillable(
|
28 |
theme = bs_theme(bootswatch = "minty"),
|
29 |
shinyjs::useShinyjs(),
|