import gradio as gr | |
from transformers import pipeline | |
sentiment = pipeline('sentiment-analysis') | |
def get_sentiment(input_text): | |
return sentiment(input_text) | |
# Gradio ์ธํฐํ์ด์ค ์ค์ | |
iface = gr.Interface(fn=get_sentiment, title="Sentiment Analysis", inputs="text", outputs="text") | |
# ์ธํฐํ์ด์ค ์คํ | |
iface.launch() |