mike10's picture
Update app.py
83ff86d
raw
history blame
316 Bytes
import gradio as gr
from transformers import pipeline
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", examples=examples).launch(debug=True)