emirkocak's picture
Create app.py
2f33e52
raw
history blame
486 Bytes
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()