huggingfacePipeline
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
import Pipeline from "https://esm.town/v/iamseeley/pipeline";
// ...
} else if (req.method === "POST") {
const { inputs } = await req.json();
const pipeline = new Pipeline("task", "model");
const result = await pipeline.run(inputs);
return new Response(JSON.stringify(result), { headers: { "Content-Type": "application/json" } });
}
}
Migrated from folder: Experiments/ai/huggingfacePipeline
