Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -11,8 +11,11 @@ def summarization(text):
|
|
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]['label']
|
|
|
|
|
14 |
return result
|
15 |
|
|
|
16 |
def main():
|
17 |
st.set_page_config(page_title="Your Text Analysis", page_icon="🦜")
|
18 |
st.header("Tell me your comments!")
|
|
|
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]['label']
|
14 |
+
if result != 'negative':
|
15 |
+
result = 'positive'
|
16 |
return result
|
17 |
|
18 |
+
|
19 |
def main():
|
20 |
st.set_page_config(page_title="Your Text Analysis", page_icon="🦜")
|
21 |
st.header("Tell me your comments!")
|