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

Update pages/📷 CritiSense.py

Browse files
Files changed (1) hide show
  1. pages/📷 CritiSense.py +6 -7
pages/📷 CritiSense.py CHANGED
@@ -45,18 +45,17 @@ end_ml=time.time()
45
  st.write("Review:", user_review)
46
  ml_time=end_ml-start_ml
47
 
48
- 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:.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
 
 
45
  st.write("Review:", user_review)
46
  ml_time=end_ml-start_ml
47
 
48
+ # 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:.4f} seconds")
53
 
54
 
55
  execution_time_container = st.empty() # Создаем пустой контейнер для отображения времени выполнения
56
 
57
  if st.button("Analyze Sentiment"):
58
+ st.write("Predicted Sentiment:", prediction)
 
59
  st.markdown(f"Execution Time: {ml_time:.2f} seconds")
60
  execution_time_container.text(f"Execution Time: {execution_time:.5f} seconds")
61