Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -15,11 +15,8 @@ def tras_sum(input):
|
|
| 15 |
return traslated_summary
|
| 16 |
|
| 17 |
# Load the summarization & translation model pipeline
|
| 18 |
-
#tran_sum_pipe = pipeline("translation", model='utrobinmv/t5_summary_en_ru_zh_base_2048')
|
| 19 |
-
#trans_pipe = pipeline("translation", model='liam168/trans-opus-mt-zh-en')
|
| 20 |
sentiment_pipeline = pipeline("text-classification", model='Howosn/Sentiment_Model',return_all_scores=True)
|
| 21 |
|
| 22 |
-
|
| 23 |
# Streamlit application title
|
| 24 |
st.title("Emotion analysis")
|
| 25 |
st.write("Turn Your Input Into Sentiment Score")
|
|
@@ -42,6 +39,6 @@ if st.button("Analyse"):
|
|
| 42 |
max_score = result['score']
|
| 43 |
max_label = result['label']
|
| 44 |
|
| 45 |
-
st.write("Text:",
|
| 46 |
st.write("Label:", max_label)
|
| 47 |
st.write("Score:", max_score)
|
|
|
|
| 15 |
return traslated_summary
|
| 16 |
|
| 17 |
# Load the summarization & translation model pipeline
|
|
|
|
|
|
|
| 18 |
sentiment_pipeline = pipeline("text-classification", model='Howosn/Sentiment_Model',return_all_scores=True)
|
| 19 |
|
|
|
|
| 20 |
# Streamlit application title
|
| 21 |
st.title("Emotion analysis")
|
| 22 |
st.write("Turn Your Input Into Sentiment Score")
|
|
|
|
| 39 |
max_score = result['score']
|
| 40 |
max_label = result['label']
|
| 41 |
|
| 42 |
+
st.write("Text:", trans)
|
| 43 |
st.write("Label:", max_label)
|
| 44 |
st.write("Score:", max_score)
|