shashankheg's picture
Create app.py
fab162a verified
raw
history blame
563 Bytes
import gradio as gr
import transformers
from transformers import pipeline
sentiment = pipeline("sentiment-analysis")
def get_sentiment(input_text):
return sentiment(input_text)
interface = gr.Interface(fn =get_sentiment,
inputs = 'text',
outputs = ['text'],
title= 'Sentiment Analysis',
theme = gr.themes.Glass(),
css = """"
body {background-color: #FFCCCB}"""
)
interface.launch()