Add chrome extension example built with plasmo
Summary
This PR implements chrome extension with transformers.js and plasmo. LLaMA, Phi3, SmolLM, Qwen series have been tested on Apple M1 Max.
Demo
The chrome extension hasn't been released to chrome store yet. Please refer to youtube demo or the original repo for how it works.
Reproduce
- Install dependencies
cd chrome-extension-plasmo
pnpm install
pnpm run dev
It will build chrome extension and output build/chrome-mv3-dev.
- Install chrome extension manually
Open chrome chrome://extensions and load unpacked from build/chrome-mv3-dev
- Click on icon to open side panel.
Enjoy!
Hi @xenova , can you review PR for chrome extension example?
Hey @tantara! Thanks for the PR! Apologies for not responding earlier - it's been a super busy time lately!
The PR is quite large, so it might take some time to fully review, but I'll do my best to get to it ASAP! In the meantime, I see there are a few "WIP" and TODOs in the README. Are those planned in a future update, or is it something you'd like to include in this PR?
Thanks! 🤗
Hi @xenova thanks for following up. I just wanted to make this PR bare minimum for chrome extension with plasmo. I think plasmo would require more setup than your extension demo.
Edit: I updated README to make it clear. I've completed some WIP and TODOs (e.g. deepseek-r1) in a separate repo https://github.com/tantara/transformers.js-chrome. If this PR is merged, I will add more features into this repo.