News_Bias_Detector / interfaceold.py
virk24's picture
Upload folder using huggingface_hub
80bc5ae verified
import gradio as gr
from allpredsold import make_preds
demo = gr.Interface(
fn=make_preds,
inputs=[gr.TextArea(label="Content",
show_label=True,
placeholder="Enter some text to detect bias....."),
gr.Radio(choices=["Gender Bias", "Racial Bias", "Political Bias", "Hate Speech"],
label="Bias Type")],
outputs=[gr.HighlightedText(combine_adjacent=True, label="Bias Analysis", show_label=True),
gr.Label(label="Bias Scores", show_label=True),
gr.HTML(label="Bias Score", show_label=True)],
title="Bias Analyzer",
description="This app lets you detect and analyze different types of bias in written content. Right now we have support for four bias categories: gender, racial, political, and hate-speech. More categories will be added soon!"
)
demo.launch(share=True)