from transformers import AutoModelForSequenceClassification, AutoTokenizer, pipeline import gradio as gr tokenizer = AutoTokenizer.from_pretrained( "finiteautomata/beto-sentiment-analysis") model = AutoModelForSequenceClassification.from_pretrained( "finiteautomata/beto-sentiment-analysis") classifier = pipeline("sentiment-analysis", model=model, tokenizer=tokenizer) from pysentimiento import create_analyzer analyzer = create_analyzer(task="sentiment", lang="es") def get_sentiment(input_text): return analyzer.predict(input_text) iface = gr.Interface(fn=get_sentiment, inputs="text", outputs=["text"], description ="""

Importante colocar solo una oración en español, puede contener emoji😎, para mas demo.haz clik aqui

""" , title="Análisis de Sentimiento en Español ") iface.launch(inline=False)