Skip to content

Commit

Permalink
adding back threads
Browse files Browse the repository at this point in the history
  • Loading branch information
cocktailpeanut committed Mar 22, 2023
1 parent 6b1c93e commit a203853
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions bin/web/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ const start = (port, home) => {
app.set('view engine', 'ejs');
app.set('views', path.resolve(__dirname, "views"))
app.get("/", (req, res) => {
res.render("index")
res.render("index", {
threads: os.cpus().length
})
})

const defaultDir = path.join(__dirname, "prompts");
Expand Down Expand Up @@ -69,4 +71,4 @@ const start = (port, home) => {
console.log(`Server running on http:https://localhost:${port}/`)
})
}
module.exports = start
module.exports = start
2 changes: 1 addition & 1 deletion bin/web/views/index.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@
const fields = [{
key: "debug",
type: "checkbox"
}, "n_predict", "repeat_last_n", "repeat_penalty", "top_k", "top_p", "temp", "seed"].map((key) => {
}, "n_predict", "repeat_last_n", "repeat_penalty", "top_k", "top_p", "temp", "seed", "threads"].map((key) => {
if (typeof key === "string") {
return `<div class='kv'>
<label>${key}</label>
Expand Down

0 comments on commit a203853

Please sign in to comment.