jjpwong's picture
Create app.py
fba9bc7
raw
history blame
506 Bytes
import gradio as gr
from transformers import pipeline
sentiment = pipeline("sentiment-analysis")
def get_sentiment(input_text):
return sentiment(input_text)
demo = gr.Interface(fn = get_sentiment,
inputs = 'text',
outputs = ['text'],
title = 'Sentiment Analysis Demo (ζƒ…η·’εˆ†ζžη€Ίη―„)',
description = "Analyze the sentiment based on given input (positive or negative) ζƒ…η·’εˆ†ζž"
)
demo.launch()