SaviAnna commited on
Commit
ac97786
·
1 Parent(s): f98b33e

Update pages/📷 CritiSense.py

Browse files
Files changed (1) hide show
  1. pages/📷 CritiSense.py +11 -1
pages/📷 CritiSense.py CHANGED
@@ -49,4 +49,14 @@ if prediction == 1:
49
  st.markdown("<p style='color: green;'>Sentiment: Positive</p>", unsafe_allow_html=True)
50
  else:
51
  st.markdown("<p style='color: red;'>Sentiment: Negative</p>", unsafe_allow_html=True)
52
- st.markdown(f"Execution Time: {ml_time:.3f} seconds")
 
 
 
 
 
 
 
 
 
 
 
49
  st.markdown("<p style='color: green;'>Sentiment: Positive</p>", unsafe_allow_html=True)
50
  else:
51
  st.markdown("<p style='color: red;'>Sentiment: Negative</p>", unsafe_allow_html=True)
52
+ st.markdown(f"Execution Time: {ml_time:.4f} seconds")
53
+
54
+
55
+ execution_time_container = st.empty() # Создаем пустой контейнер для отображения времени выполнения
56
+
57
+ if st.button("Analyze Sentiment"):
58
+ predicted_label, execution_time = predict(user_review_clean)
59
+ st.write("Predicted Sentiment:", predicted_label)
60
+ st.markdown(f"Execution Time: {ml_time:.2f} seconds")
61
+ execution_time_container.text(f"Execution Time: {execution_time:.5f} seconds")
62
+