An NLP model to detect sarcasm in text, mostly news headlines. Trained using google BERT. I have used tensorflow.keras for the process.
IMPORTANT NOTICE!! : Due the github's file upload limitatinos, the model file 'Bert_sarcasm.h5' needs to downloaded separately from this link: https://drive.google.com/file/d/16Qi_bLVxTz7be_tb-GtFz5B0QrmqBML9/view?usp=share_link
Requirements : Python 3 + Tensorflow + Tensorflow_hub + Tensorflow_text
Dataset used : https://www.kaggle.com/datasets/rmisra/news-headlines-dataset-for-sarcasm-detection
Intructions : After downloading the model, place it in the same directory as runmodel.py, then then execute the script.
Other info : 'Showcase.jpg' contains a demonstration of the model's capabilities. Also note that the accuracy of model is 80%.