Spaces:
Sleeping
Sleeping
| import gradio as gr | |
| from transformers import pipeline | |
| # ๊ฐ์ ๋ถ์ ํ์ดํ๋ผ์ธ ์ด๊ธฐํ | |
| sentiment_analysis = pipeline("sentiment-analysis") | |
| def predict_sentiment(text): | |
| result = sentiment_analysis(text) | |
| return result[0] | |
| # Gradio ์ธํฐํ์ด์ค ์ค์ ๋ฐ ์ฑ ์คํ | |
| iface = gr.Interface(fn=predict_sentiment, inputs="text", outputs="text", title="Simple Sentiment Analysis") | |
| iface.launch() |