Howosn commited on
Commit
b3b47e7
1 Parent(s): 7d56d5b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -3,7 +3,7 @@ from transformers import pipeline
3
 
4
  # Load the summarization & translation model pipeline
5
  tran_sum_pipe = pipeline("translation", model='utrobinmv/t5_summary_en_ru_zh_base_2048')
6
- #sentiment_pipeline = pipeline("text-classification", model="Howosn/Sentiment_Model")
7
 
8
  # Streamlit application title
9
  st.title("Emotion analysis")
@@ -16,8 +16,8 @@ text = st.text_area("Enter the text", "")
16
  if st.button("Analyse"):
17
  # Perform text classification on the input text
18
  trans_sum = tran_sum_pipe(text)
19
- #result = sentiment_pipeline(trans_sum)
20
-
21
  # Display the analysis result
22
  st.write("Text:", text)
23
- st.write("result:", trans_sum)
 
3
 
4
  # Load the summarization & translation model pipeline
5
  tran_sum_pipe = pipeline("translation", model='utrobinmv/t5_summary_en_ru_zh_base_2048')
6
+ sentiment_pipeline = pipeline("text-classification", model="Howosn/Sentiment_Model")
7
 
8
  # Streamlit application title
9
  st.title("Emotion analysis")
 
16
  if st.button("Analyse"):
17
  # Perform text classification on the input text
18
  trans_sum = tran_sum_pipe(text)
19
+ result = sentiment_pipeline(trans_sum)
20
+
21
  # Display the analysis result
22
  st.write("Text:", text)
23
+ st.write("result:", result)