antoniorached's picture
Update app.py
80e17cb verified
raw
history blame
345 Bytes
from transformers import pipeline
import gradio as gr
pipe = pipeline("sentiment-analysis")
def get_sentiment(input):
return pipe(input)
demo = gr.Interface(
fn=get_sentiment,
inputs="text",
outputs=["text"],
title="Sentiment Analysis",
description="Get a sentimental analysis for the provided text"
)
demo.launch()