Spaces:
Runtime error
Runtime error
from test import test_predict | |
import gradio as gr | |
def gradio_comment(comment): | |
result = test_predict(comment)[0] | |
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}''') | |
iface = gr.Interface(gradio_comment, "text", "text") | |
if __name__ == "__main__": | |
iface.launch(enable_queue=True) |