mafoaurelie's picture
Update app.py
664be2a verified
raw
history blame
467 Bytes
import gradio as gr
from transformers import pipeline
sentiment= pipeline("sentiment-analysis")
def get_sentiment(input_text):
texte= sentiment(input_text)
result=texte[0]['label']
return result
iface=gr.Interface(title='Sentiment Analysis',
fn=get_sentiment,
inputs='text',
outputs='text',
description="Get Sentiment Negative/Positive for giving input")
iface.launch()