Inspiration

In an age where more and more of the internet is made of AI-generated content, many of us care about seeing human-created content. This issue is especially prevalent on social media sites such as Instagram, TikTok, and Reddit. What if, instead of having to see content you weren't going to pay any attention to, they were automatically hidden, so that you could spend more time seeing content made by humans. This was our goal when making MyHumanReddit.

What it does

The idea of the extension is to listen to Reddit, and whenever new posts are added to the screen, we scan them for AI, and if the post is predicted to be AI with a level of certainty (defined by the user), then that post would be hidden.

How we built it

To accomplish the project, we set up several listeners to react to whenever the page changed, or whenever the user scrolled down far enough, or if the user changed their settings. When that happened, the extension would scrape new posts for their IDs and send them, as well as text, to a backend Flask server. From there, we call the SightEngine or ZeroGPT APIs to generate a confidence percentage of if the content is AI. That confidence level is passed back to the extension, which hides any posts that have an AI confidence over the user's preferred confidence level by setting the DOM element to invisible.

Challenges we ran into

A challenge we ran into was the SightEngine API requiring the actual image and video bytes, instead of links to them. Initially, we planned to scrape Reddit for post ids and images, send those to the backend, and have the backend just use that data. However, since we couldn't send entire videos to the backend, we had to reengineer the system to scrape only the post ids to the backend, and from there the backend we built Reddit data extraction pipeline using HTTP requests to fetch structured JSON data and programmatically download post media including images and videos. This ensured we would be able to have the direct media files on the device acceptable by SightEngine API for processing.

Accomplishments that we're proud of

Given that Reddit is an SPA (Single Page App), the extension isn't reloaded every time you navigate pages. This proves to be a problem when trying to apply our extension consistently, as navigating back to the home page doesn't trigger a load of the extension. Instead, the extension had to be programmed to always listen for the page changing, and dynamically switch between modes depending on which page was being visited, as well as when to turn itself off on pages where it wasn't supposed to do anything.

What we learned

The biggest learning for all of us was creating the Chrome extension, as there is specific requirements that go into the creation of an extension. In addition to that, we gained experience in navigating the DOM to scrape data from the web, as well as navigating and editing the DOM to hide posts.

What's next for MyHumanReddit

The main next step for the project at this point would be to increase response time via the parallelization of calls to the SightEngine API. In the future, the project could also be expanded to other social media platforms by finding the specific DOM structures used by those websites.

Built With

Share this project:

Updates