transformers.js-examples icon indicating copy to clipboard operation
transformers.js-examples copied to clipboard

Add chrome extension example built with plasmo

Open tantara opened this issue 1 year ago • 3 comments

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

  1. Install dependencies
cd chrome-extension-plasmo
pnpm install
pnpm run dev

It will build chrome extension and output build/chrome-mv3-dev.

  1. Install chrome extension manually

Open chrome chrome://extensions and load unpacked from build/chrome-mv3-dev

  1. Click on icon to open side panel.

Enjoy!

tantara avatar Dec 02 '24 04:12 tantara

Hi @xenova , can you review PR for chrome extension example?

tantara avatar Dec 02 '24 04:12 tantara

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! 🤗

xenova avatar Jan 22 '25 13:01 xenova

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.

tantara avatar Jan 25 '25 02:01 tantara