RakshakRit / app.py
shubhamjaiswar's picture
Update app.py
cbe067e
raw
history blame
281 Bytes
from transformers import pipeline
import gradio as gr
sentimentAnalyzer = pipeline("sentiment-analysis")
def predict_sentiment(text):
return sentimentAnalyzer(text)[0]['label']
iface = gr.Interface(fn=predict_sentiment,inputs=["text"],outputs=["text"])
iface.launch(share=True)