sarahciston commited on
Commit
855a94a
1 Parent(s): 6ff171e

simplify output temporarily, call async function

Browse files
Files changed (1) hide show
  1. index.js +10 -6
index.js CHANGED
@@ -10,13 +10,17 @@ async function fillIn(){
10
  const fillInTask = await pipeline('fill-mask', 'Xenova/bert-base-uncased');
11
 
12
  var out = await fillInTask(PROMPT_INPUT);
 
 
13
 
14
- await out.forEach(o => {
15
- console.log(o) // yields { score, sequence, token, token_str } for each result
16
- OUTPUT_LIST.push(o.sequence) // put only the full sequence in a list
17
- })
18
 
19
- console.log(OUTPUT_LIST)
20
 
21
- return await OUTPUT_LIST
22
  }
 
 
 
10
  const fillInTask = await pipeline('fill-mask', 'Xenova/bert-base-uncased');
11
 
12
  var out = await fillInTask(PROMPT_INPUT);
13
+
14
+ console.log(await out)
15
 
16
+ // await out.forEach(o => {
17
+ // console.log(o) // yields { score, sequence, token, token_str } for each result
18
+ // OUTPUT_LIST.push(o.sequence) // put only the full sequence in a list
19
+ // })
20
 
21
+ // console.log(OUTPUT_LIST)
22
 
23
+ return await out
24
  }
25
+
26
+ await fillIn()