sent2 / app.py
PH83's picture
Update app.py
fef7f78
raw
history blame contribute delete
409 Bytes
import gradio as gr
from transformers import pipeline
sentiment = pipeline("sentiment-analysis")
def sent(input_text):
return sentiment(input_text)
iface = gr.Interface(fn = sent,
inputs = 'text' ,
outputs = ['text'],
title = 'sentiment analysis',
description = 'this is taking the sentiment of a sentence')
iface.launch()