Amitesh007's picture
Update app.py
797da9c
import gradio as gr
import os
HF_TOKEN = os.getenv("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")
hf_writer = gr.HuggingFaceDatasetSaver(HF_TOKEN,dataset_name="flagged_data")
description = "Get sentiment if a comment is 'no cyber bullying' or 'cyber bullying'.The predicted outputs refer to 'cyber bullying' for racism and sexism comments and 'no cyber bullying' for others comments.please do flag if you feel that the required output isn't desired output "
title = "Cyber Bullying Sentiment Classifier"
examples = [["lets have a coffee later on"],["go to hell Muslims "],["I respect your work ethics"]
gr.Interface.load("models/Amitesh007/tw-sentiment-finetuned",
description = description,
title = title,
examples = examples,
allow_flagging="manual",
flagging_options=["incorrect", "ambiguous"],
flagging_callback = hf_writer
).launch()