adollbo commited on
Commit
83f79f0
·
1 Parent(s): 2187b60

fixed imports after moving functions

Browse files
Files changed (1) hide show
  1. app.py +6 -5
app.py CHANGED
@@ -3,9 +3,9 @@ import pandas as pd
3
  import logging
4
  from deeploy import Client
5
  from utils import get_request_body, get_fake_certainty, get_model_url, get_random_suspicious_transaction
6
- from utils import get_explainability_texts, get_explainability_values, send_evaluation, get_explanation
7
  from utils import COL_NAMES, feature_texts
8
- from visual_components import create_data_input_table, create_table, ChangeButtonColour
9
 
10
  logging.basicConfig(level=logging.INFO)
11
 
@@ -34,10 +34,11 @@ def rerun():
34
  st.session_state.predict_button_clicked = True
35
  st.session_state.submitted_disabled = False
36
 
37
-
38
  def submitted_disabled():
39
  st.session_state.submitted_disabled = True
40
-
 
 
41
 
42
  st.markdown("""
43
  <style>
@@ -173,7 +174,7 @@ if st.session_state.got_explanation:
173
  # st.write('after eval')
174
  # st.write(st.session_state)
175
  if st.session_state.yes_button:
176
- explanation = get_explanation(certainty, explainability_texts, explainability_values)
177
  comment = st.text_area("Reason for evaluation:", explanation)
178
  st.session_state.evaluation_input["explanation"] = comment
179
  if st.session_state.no_button:
 
3
  import logging
4
  from deeploy import Client
5
  from utils import get_request_body, get_fake_certainty, get_model_url, get_random_suspicious_transaction
6
+ from utils import get_explainability_texts, get_explainability_values, send_evaluation, get_comment_explanation
7
  from utils import COL_NAMES, feature_texts
8
+ from utils import create_data_input_table, create_table, ChangeButtonColour
9
 
10
  logging.basicConfig(level=logging.INFO)
11
 
 
34
  st.session_state.predict_button_clicked = True
35
  st.session_state.submitted_disabled = False
36
 
 
37
  def submitted_disabled():
38
  st.session_state.submitted_disabled = True
39
+
40
+ if 'predict_button' not in st.session_state:
41
+ st.session_state.predict_button = False
42
 
43
  st.markdown("""
44
  <style>
 
174
  # st.write('after eval')
175
  # st.write(st.session_state)
176
  if st.session_state.yes_button:
177
+ explanation = get_comment_explanation(certainty, explainability_texts, explainability_values)
178
  comment = st.text_area("Reason for evaluation:", explanation)
179
  st.session_state.evaluation_input["explanation"] = comment
180
  if st.session_state.no_button: