【PipApp】下面我们来看看一个 PipApp 长什么样:
import { createLearnable, nlp } from '@pipcook/app';
const isCooking = createLearnable(async function(sentence: string) {
return (await nlp.classify(sentence));
});
const isBooking = createLearnable(async function(sentence: string) {
return (await nlp.classify(sentence));
});
(async () => {
console.log(await isCooking('test'));
console.log(await isBooking('booking test'));
})();