Sentiment_Analyzer / Sentiment_Analyzer_app.py
pavankumarhm's picture
Update Sentiment_Analyzer_app.py
3347b29
raw
history blame contribute delete
342 Bytes
from transformers import pipeline
classifier = pipeline("sentiment-analysis")
def func(utterance):
return classifier(utterance)
import gradio as gr
descriptions = "Enter a text and get the sentiment prediction."
app = gr.Interface(fn=func, inputs="text", outputs="text", title="Sentiment Analayzer", description=descriptions)
app.launch()