import gradio as gr import Negativ.PythonCode.__init__ as pc msg_deleted = "--This Toxic Comment Has Been Deleted--" print(dir(pc)) def predict_toxicity(sentence): if pc.is_toxic(sentence): return msg_deleted else: return sentence demo = gr.Interface(fn=predict_toxicity, inputs="text", outputs="text") demo.launch()