Update my_model/utilities/state_manager.py
Browse files
my_model/utilities/state_manager.py
CHANGED
@@ -12,6 +12,9 @@ class StateManager:
|
|
12 |
st.session_state['images_data'] = {}
|
13 |
if 'kbvqa' not in st.session_state:
|
14 |
st.session_state['kbvqa'] = None
|
|
|
|
|
|
|
15 |
|
16 |
|
17 |
def set_up_widgets(self):
|
@@ -33,8 +36,8 @@ class StateManager:
|
|
33 |
def display_model_settings(self):
|
34 |
st.write("#### Current Model Settings:")
|
35 |
data = [{'Key': key, 'Value': str(value)} for key, value in st.session_state.items() if key in ["confidence_level", 'detection_model', 'method', 'kbvqa']]
|
36 |
-
df = pd.DataFrame(data)
|
37 |
-
styled_df = df.style.set_properties(**{'background-color': 'black', 'color': '
|
38 |
st.table(styled_df)
|
39 |
|
40 |
def display_session_state(self):
|
|
|
12 |
st.session_state['images_data'] = {}
|
13 |
if 'kbvqa' not in st.session_state:
|
14 |
st.session_state['kbvqa'] = None
|
15 |
+
if "button_lablel" not in st.session_state:
|
16 |
+
st.session_state['kbvqa'] = "Load Model"
|
17 |
+
|
18 |
|
19 |
|
20 |
def set_up_widgets(self):
|
|
|
36 |
def display_model_settings(self):
|
37 |
st.write("#### Current Model Settings:")
|
38 |
data = [{'Key': key, 'Value': str(value)} for key, value in st.session_state.items() if key in ["confidence_level", 'detection_model', 'method', 'kbvqa']]
|
39 |
+
df = pd.DataFrame(data, index=False)
|
40 |
+
styled_df = df.style.set_properties(**{'background-color': 'black', 'color': 'white', 'border-color': 'white'})
|
41 |
st.table(styled_df)
|
42 |
|
43 |
def display_session_state(self):
|