DEV Community

opticXC
opticXC

Posted on

Gev: Privacy focused Email tagging system

Hacktoberfest Weekend Challenge: Build for a Friend Submission 🤝

This is a submission for the Hacktoberfest Weekend Challenge: Build for a Friend

What I Built

I built Gev, a browser extension that automatically labels new mails you recieve. It sorts messages into Receipts, Personal, Updates, Newsletters, Logins etc.

I built it for a friend, who cannot be bothered to go through every mail he has. I wanted to make email triage easier without sending their messages to an external AI service.

Code

WIP, Will open soon

How I Built It

Gev uses the open laya (https://github.com/receptron/laya) model with ONNX Runtime Web. The model and runtime are bundled with the extension, and remote model loading is disabled.

When I open gmail, the extension checks for new messages and mail, passes their content to the model. we get probability that the extension uses to automatically tag mails into categories like
Reciepts, Trackers, Login, OTP, Newsletter, Etc.

During testing, I found that Gmail blocked my first approach, which tried to start a model worker from the page script. I moved inference behind the extension’s service worker and switched the content script to extension messaging.

Why Does Open Innovation Matter?

The open model and browser inference tools made it possible to bundle classification with the extension and run it on-device. That gives Gev local inference path without a hosted model or inference API, keeping data private and contained

It also gives users and contributors a way to inspect how classification works, change the label descriptions, or experiment with a different compatible model. For email, keeping message text out of a separate inference service is a useful property of the design.

DEV tag: hf26challenge

Top comments (0)