Spaces:
Running
Running
Update my_model/utilities/state_manager.py
Browse files
my_model/utilities/state_manager.py
CHANGED
@@ -14,6 +14,8 @@ class StateManager:
|
|
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 |
|
@@ -37,7 +39,7 @@ class StateManager:
|
|
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)
|
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):
|
|
|
14 |
st.session_state['kbvqa'] = None
|
15 |
if "button_lablel" not in st.session_state:
|
16 |
st.session_state['kbvqa'] = "Load Model"
|
17 |
+
if "previous_state" not in st.session_state:
|
18 |
+
st.session_state['previous_state'] = None
|
19 |
|
20 |
|
21 |
|
|
|
39 |
st.write("#### Current Model Settings:")
|
40 |
data = [{'Key': key, 'Value': str(value)} for key, value in st.session_state.items() if key in ["confidence_level", 'detection_model', 'method', 'kbvqa']]
|
41 |
df = pd.DataFrame(data)
|
42 |
+
styled_df = df.style.set_properties(**{'background-color': 'black', 'color': 'white', 'border-color': 'white'}).set_table_styles([{'selector': 'th','props': [('background-color', 'gray'), ('font-weight', 'bold')]}])
|
43 |
st.table(styled_df)
|
44 |
|
45 |
def display_session_state(self):
|