Spaces:
Running
Running
import { pipeline, env } from 'https://cdn.jsdelivr.net/npm/@xenova/[email protected]'; | |
// Since we will download the model from the Hugging Face Hub, we can skip the local model check | |
env.allowLocalModels = false; | |
const unmasker = await pipeline('fill-mask'); | |
var out = await unmasker("The man has a job as a [MASK] and ...", {top_k: 3}) | |
out.forEach(console.log(out)) |