Spaces:
Running
Running
sarahciston
commited on
Commit
•
9e5d3d1
1
Parent(s):
a8f0395
start on image captioner
Browse files
sketch.js
CHANGED
@@ -14,6 +14,17 @@ var outText, outPics, outInfo // html elements to hold the results
|
|
14 |
var blanksArray = [] // an empty list to store all the variables we enter to modify the prompt
|
15 |
// e.g. ["woman", "man", "non-binary person"]
|
16 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
17 |
// RUN TEXT-GEN MODEL
|
18 |
|
19 |
async function textGenTask(pre, prompt, blanks){
|
|
|
14 |
var blanksArray = [] // an empty list to store all the variables we enter to modify the prompt
|
15 |
// e.g. ["woman", "man", "non-binary person"]
|
16 |
|
17 |
+
// // RUN IMAGE CAPTIONER //// W-I-P
|
18 |
+
// async function captionTask(prompt){
|
19 |
+
// // PICK MODEL
|
20 |
+
// let MODEL = 'Xenova/vit-gpt2-image-captioning'
|
21 |
+
// const pipe = await pipeline("image-to-text", MODEL)
|
22 |
+
|
23 |
+
// const out = await pipe(prompt)
|
24 |
+
|
25 |
+
// out = JSON.stringify(out, null, 2)
|
26 |
+
// }
|
27 |
+
|
28 |
// RUN TEXT-GEN MODEL
|
29 |
|
30 |
async function textGenTask(pre, prompt, blanks){
|