import gradio as gr import transformers from transformers import pipeline #Route pour avoir accès au modèle classifier = pipeline("sentiment-analysis") def sentimental (text): resultat = classifier(text) return resultat [0]['label'] demo = gr.Interface(sentimental, title= "ANALYSES DE SENTIMENTS", inputs = "text", outputs = "text", description = "Découvrez le sentiment pour tout texte") demo.launch(quiet = True)