Sarah Ciston
commited on
Commit
·
1e5c489
1
Parent(s):
9882815
syntax issues in model call
Browse files
sketch.js
CHANGED
@@ -92,14 +92,14 @@ new p5(function (p5) {
|
|
92 |
// submitButton.position(0,500)
|
93 |
submitButton.size(170)
|
94 |
submitButton.class('submit');
|
95 |
-
submitButton.parent('#buttonsDiv')
|
96 |
submitButton.mousePressed(getInputs)
|
97 |
|
98 |
// add more blanks to fill in
|
99 |
let addButton = p5.createButton("more blanks")
|
100 |
addButton.size(170)
|
101 |
// addButton.position(220,500)
|
102 |
-
addButton.parent('#buttonsDiv')
|
103 |
addButton.mousePressed(addField)
|
104 |
|
105 |
// TO-DO a model drop down list?
|
@@ -159,21 +159,22 @@ async function runModel(PREPROMPT, PROMPT){
|
|
159 |
// // Chat completion API
|
160 |
|
161 |
// pipeline/transformers version TEST
|
162 |
-
let pipe = await pipeline('text-generation'
|
163 |
// seems to work with default model distilgpt2 ugh
|
164 |
|
165 |
// 'meta-llama/Meta-Llama-3-70B-Instruct'
|
166 |
// 'openai-community/gpt2'
|
167 |
// 'Xenova/gpt-3.5-turbo'
|
|
|
168 |
|
169 |
-
// let out = await pipe(
|
170 |
// max_tokens: 250,
|
171 |
// return_full_text: false,
|
172 |
// repetition_penalty: 1.5,
|
173 |
// num_return_sequences: 1 //must be 1 for greedy search
|
174 |
// })
|
175 |
|
176 |
-
let out = await pipe(
|
177 |
|
178 |
console.log(out)
|
179 |
|
|
|
92 |
// submitButton.position(0,500)
|
93 |
submitButton.size(170)
|
94 |
submitButton.class('submit');
|
95 |
+
// submitButton.parent('#buttonsDiv')
|
96 |
submitButton.mousePressed(getInputs)
|
97 |
|
98 |
// add more blanks to fill in
|
99 |
let addButton = p5.createButton("more blanks")
|
100 |
addButton.size(170)
|
101 |
// addButton.position(220,500)
|
102 |
+
// addButton.parent('#buttonsDiv')
|
103 |
addButton.mousePressed(addField)
|
104 |
|
105 |
// TO-DO a model drop down list?
|
|
|
159 |
// // Chat completion API
|
160 |
|
161 |
// pipeline/transformers version TEST
|
162 |
+
let pipe = await pipeline('text-generation');
|
163 |
// seems to work with default model distilgpt2 ugh
|
164 |
|
165 |
// 'meta-llama/Meta-Llama-3-70B-Instruct'
|
166 |
// 'openai-community/gpt2'
|
167 |
// 'Xenova/gpt-3.5-turbo'
|
168 |
+
// , 'Xenova/distilgpt2'
|
169 |
|
170 |
+
// let out = await pipe(PREPROMPT + PROMPT, {
|
171 |
// max_tokens: 250,
|
172 |
// return_full_text: false,
|
173 |
// repetition_penalty: 1.5,
|
174 |
// num_return_sequences: 1 //must be 1 for greedy search
|
175 |
// })
|
176 |
|
177 |
+
let out = await pipe(PREPROMPT + PROMPT)
|
178 |
|
179 |
console.log(out)
|
180 |
|