Spaces:
Running
Running
try a mask and blank array with alpaca-large
Browse files
sketch.js
CHANGED
|
@@ -6,8 +6,10 @@ import { pipeline, env } from 'https://cdn.jsdelivr.net/npm/@xenova/transformers
|
|
| 6 |
env.allowLocalModels = false;
|
| 7 |
|
| 8 |
// GLOBAL VARIABLES
|
| 9 |
-
let
|
| 10 |
-
let
|
|
|
|
|
|
|
| 11 |
let pField
|
| 12 |
let outText
|
| 13 |
|
|
|
|
| 6 |
env.allowLocalModels = false;
|
| 7 |
|
| 8 |
// GLOBAL VARIABLES
|
| 9 |
+
let blankArray = ["woman", "man"]
|
| 10 |
+
let PREPROMPT = `Please complete the phrase, replacing any [BLANK] with words from the ${blankArray} and replacing any [MASK] with your own words.`
|
| 11 |
+
// let PREPROMPT = `Please complete the phrase and fill in any [MASK]: `
|
| 12 |
+
let PROMPT_INPUT = `The [BLANK] has a job as a [MASK] but...` // a field for writing or changing a text value
|
| 13 |
let pField
|
| 14 |
let outText
|
| 15 |
|