Spaces:
Sleeping
Sleeping
File size: 425 Bytes
8e56e6b 115bf3e 8e56e6b 115bf3e 8e56e6b 115bf3e 8e56e6b |
1 2 3 4 5 6 7 8 9 10 11 12 |
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) |