The Blobfish Clickbait Detector by Davide Fonzi, Nicolò Pratelli e Lavinia Salicchi
-
Download training data and extract in the datasets /datasets/ subfolders:
-
git clone https://github.com/tira-io/blobfish
-
cd blobfish
-
install all dependencies for python 3.x
pip3 install -r requirements.txt
-
for training
python3 main.py
-
if you want to test our pretrained models
python3 test.py -i test_data -o output -m model
test_data: directory where is located test dataset
output: path of the output text
model: name of the choosen model (WordEmbNet, LingNet, FullNetPost, FullNet)
if you want to test your own model, you must change path of the model into
test.py
dir = "longTraining/models/" if type_model == "FullNet": model_path = dir + "path/to/model/model_name.hdf5" if type_model == "FullNetPost": model_path = dir + "path/to/model/model_name.hdf5" if type_model == "LingNet": model_path = dir + "path/to/model/model_name.hdf5" if type_model == "WordEmbNet": model_path = dir + "path/to/model/model_name.hdf5"
-
for evaluating
python3 eval.py test_data/truth.jsonl ./output/results.jsonl output.prototext