ya02's picture
Update app.py
448535b verified
raw
history blame contribute delete
361 Bytes
import gradio as gr
from transformers import pipeline
pipe = pipeline("sentiment-analysis")
def get_sentiment(input):
return pipe(input)
gr.Interface(
fn=get_sentiment,
inputs="text",
outputs=["text"],
title="AI Workshop Sentiment Analysis with Transformers",
description="Get Sentiment (Positive/Negative) for your input",
).launch()