from test import test_predict import gradio as gr def gradio_comment(comment): result = test_predict(comment) if result == 'OTHER': text = "NOT OFFENSİVE-OTHER" else: text = f"OFFENSİVE/{result}" return text GradioGUI = gr.Interface( fn=gradio_comment, inputs='text', outputs='text', title='Aşağılayıcı Yorum Tespiti', css='''span{text-transform: uppercase} p{text-align: center}''') GradioGUI.launch()