Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -5,15 +5,12 @@ from transformers import pipeline
|
|
5 |
sentiment = pipeline("sentiment-analysis")
|
6 |
|
7 |
def get_sentiment(์
๋ ฅ):
|
8 |
-
|
9 |
-
result = sentiment_analysis(์
๋ ฅ)
|
10 |
-
# ๋ถ์ ๊ฒฐ๊ณผ ๋ฐํ
|
11 |
-
return result
|
12 |
|
13 |
# Gradio ์ธํฐํ์ด์ค ์ค์
|
14 |
interface = gr.Interface(
|
15 |
fn=get_sentiment, # ํธ์ถ๋ ํจ์
|
16 |
-
inputs=
|
17 |
outputs="text", # ์ถ๋ ฅ ํ์
|
18 |
title="Sentiment Analysis", # UI ์ ๋ชฉ
|
19 |
description="์ด ์ฑ์ ์
๋ ฅ๋ ํ
์คํธ์ ๊ฐ์ฑ์ ๋ถ์ํฉ๋๋ค. ๊ธ์ ์ ์ด๊ฑฐ๋ ๋ถ์ ์ ์ธ ๊ฒฐ๊ณผ๋ฅผ ๋ณด์ฌ์ค๋๋ค.", # UI ์ค๋ช
|
|
|
5 |
sentiment = pipeline("sentiment-analysis")
|
6 |
|
7 |
def get_sentiment(์
๋ ฅ):
|
8 |
+
return sentiment(์
๋ ฅ)
|
|
|
|
|
|
|
9 |
|
10 |
# Gradio ์ธํฐํ์ด์ค ์ค์
|
11 |
interface = gr.Interface(
|
12 |
fn=get_sentiment, # ํธ์ถ๋ ํจ์
|
13 |
+
inputs="text", # ์
๋ ฅ๋ ์ค์
|
14 |
outputs="text", # ์ถ๋ ฅ ํ์
|
15 |
title="Sentiment Analysis", # UI ์ ๋ชฉ
|
16 |
description="์ด ์ฑ์ ์
๋ ฅ๋ ํ
์คํธ์ ๊ฐ์ฑ์ ๋ถ์ํฉ๋๋ค. ๊ธ์ ์ ์ด๊ฑฐ๋ ๋ถ์ ์ ์ธ ๊ฒฐ๊ณผ๋ฅผ ๋ณด์ฌ์ค๋๋ค.", # UI ์ค๋ช
|