Online stores can see a 270% increase in conversions by showing product reviews (Source). Negative reviews are key, as they build credibility: 82% of online shoppers look for them before buying (Source).
Writing a helpful product review, especially a negative one, can be tricky. In this demo, we use Gen AI (an LLM) to help users write informative reviews that will aid others' purchasing decisions.
- Install:
npm i
- Run:
npm start
Because the MediaPipe LLM Inference API relies on WebGPU, this demo runs in all browsers that support WebGPU. As of August 2024:
- Chrome
- Edge
- Firefox Nightly
⚠️ Turn on the flagdom.webgpu.workers.enabled
inabout:config
- Safari Technology Preview
This demo uses client-side AI (in-browser).
- This demo uses the Gemma 2B model, with the MediaPipe LLM Inference API (see npm package).
- This demo uses a worker to free up the main thread. It also includes an implementation of message passing between the worker and the main thread, to display model readiness status updates to the user.
Basic worker code is taken from MDN.