Skip to content

micah5/sponsorship_remover

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

12 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Sponsorship Remover Prototype

This is the codebase for sponsorship remover/blocker.

Usage

Training

python src/python/train.py

Prediction

Python

python src/python/predict.py

Javascript

node src/javascript/predict.js

To try the extension, go to chrome://extensions/ and load the unpacked directory ./src/javascript/extension/chrome. You can see how it works here.

Directory Guide

root/
β”œβ”€β”€ dataset/
β”‚   └── data.csv : CSV file of sponsored (0) and non-sponsored (1) sequences
β”œβ”€β”€ output/
β”‚   β”œβ”€β”€ model.h5 : Keras model
β”‚   β”œβ”€β”€ js/
β”‚   β”‚   └── ...  : Tensorflow.js model
β”‚   └── misc
β”‚       └── word_index.json : Dictionary mapping unique words to token
└── src/
    β”œβ”€β”€ python/
    β”‚   β”œβ”€β”€ predict.py : Runs a prediction on a trained model stored in output/
    β”‚   β”œβ”€β”€ train.py : Trains a model and saves in output/
    β”‚   β”œβ”€β”€ sponsorship_remover/
    β”‚   β”‚   └── ... : Internal functions used by predict.py & train.py
    β”‚   └── transcript_server
    β”‚       └── ... : Simple flask web server that wraps YouTubeTranscriptApi
    └── javascript/
        β”œβ”€β”€ predict.py : Javascript implementation of predict.py using tf.js
        └── extension/
            └── chrome/
                β”œβ”€β”€ manifest.json : Metadata for chrome extension
                β”œβ”€β”€ popup.html : HTML template (with Vue.js) for extension popout
                β”œβ”€β”€ js
                β”‚   └── content.js : Deployed within browser, contains code to handle predictions
                β”‚   └── popup.js : Logic for popup.html
                β”‚   └── libs
                β”‚       └── ... : Deployed dependencies
                └── style
                    └── ... : Misc style files including CSS for popup.html

About

🚫 adblock for in-video sponsorships

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published