mike10's picture
Update app.py
38e8bc0
raw
history blame
530 Bytes
import gradio as gr
from transformers import pipeline
from presentation import main_title, examples
model = 'hackathon-pln-es/Detect-Acoso-Twitter-Es'
def classify(text):
cls= pipeline("text-classification", model=model)
return cls(text)[0]['label']
gr.Interface(fn=classify, inputs=["textbox"], outputs="text", description=main_title,
examples=examples,
theme="peach",
thumbnail="None",
css="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/css/bootstrap.min.css").launch(debug=True)