gradi_senti / app.py
mlizer's picture
Update app.py
4c6a6fe verified
raw
history blame contribute delete
352 Bytes
from transformers import pipeline
import gradio as gr
sentiment = pipeline('sentiment-analysis')
def get_sentiment(input_text):
return sentiment(input_text)
result = get_sentiment("The movie was bad")
iface = gr.Interface(fn = get_sentiment, inputs= 'text', outputs = ['text'], title = 'Sentiment Analysis')
iface.launch(inline = False, share= True)