Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -10,7 +10,7 @@ def summarization(text):
|
|
10 |
# Sentiment Classification
|
11 |
def sentiment_classification(summary):
|
12 |
sentiment_model = pipeline("text-classification", model="wxrrrrrrr/finetunde_sentiment_analysis")
|
13 |
-
result = sentiment_model(summary, max_length=100, truncation=True)[0]
|
14 |
return result
|
15 |
|
16 |
def main():
|
@@ -26,9 +26,11 @@ def main():
|
|
26 |
|
27 |
# Stage 2: Sentiment Classification
|
28 |
st.text('Analyzing sentiment...')
|
29 |
-
|
30 |
-
|
31 |
-
|
|
|
|
|
32 |
# Display the classification result
|
33 |
st.write("Sentiment:", sentiment)
|
34 |
|
|
|
10 |
# Sentiment Classification
|
11 |
def sentiment_classification(summary):
|
12 |
sentiment_model = pipeline("text-classification", model="wxrrrrrrr/finetunde_sentiment_analysis")
|
13 |
+
result = sentiment_model(summary, max_length=100, truncation=True)[0]
|
14 |
return result
|
15 |
|
16 |
def main():
|
|
|
26 |
|
27 |
# Stage 2: Sentiment Classification
|
28 |
st.text('Analyzing sentiment...')
|
29 |
+
result = sentiment_classification(summary)
|
30 |
+
sentiment = result['label']
|
31 |
+
score = result['score']
|
32 |
+
st.write("Sentiment:", sentiment)
|
33 |
+
st.write("Score:", score)
|
34 |
# Display the classification result
|
35 |
st.write("Sentiment:", sentiment)
|
36 |
|