File size: 438 Bytes
1535acc 2de9011 c126e54 2de9011 2e32707 2de9011 |
1 2 3 4 5 6 7 8 9 10 11 12 13 |
from transformers import pipeline
import gradio as gr
sentiment =pipeline("sentiment-analysis")
def get_sentiment(input_text):
return sentiment(input_text)
iface= gr.Interface(fn = get_sentiment,
inputs ="text",
outputs =['text'],
title ='Sentiment Analysis',
description = 'Get Sentiment Negative/Positive for the given input')
iface.launch(inline=False) |