Spaces:
Sleeping
Sleeping
File size: 409 Bytes
f02bc62 dcea58a f02bc62 dcea58a f02bc62 dcea58a f02bc62 dcea58a | 1 2 3 4 5 6 7 8 9 10 11 12 13 | 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() |