Spaces:
Sleeping
Sleeping
import gradio as gr | |
from transformers import pipeline | |
def greet(tweet): | |
classifier = pipeline('text-classification', model='ancebuc/tweet-eval-sentiment') | |
label = classifier(tweet)['label'] | |
labels = [{'LABEL_0': 'Negativo :)', 'LABEL_1': 'Neutro :/', 'LABEL_2': 'Positivo :)'}] | |
return labels[label] | |
iface = gr.Interface(fn=greet, inputs="text", outputs="text") | |
iface.launch() |