Sina Media Lab
commited on
Commit
·
a743789
1
Parent(s):
e6f6b59
Updates
Browse files
app.py
CHANGED
@@ -178,17 +178,15 @@ selected_answer = st.radio(
|
|
178 |
if selected_answer:
|
179 |
st.session_state.submit_enabled = True
|
180 |
|
181 |
-
# Submit/New actions as
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
else:
|
191 |
-
action = None
|
192 |
|
193 |
# Handle the selected action
|
194 |
if action == "Submit" and st.session_state.submit_enabled:
|
|
|
178 |
if selected_answer:
|
179 |
st.session_state.submit_enabled = True
|
180 |
|
181 |
+
# Show Submit/New actions as disabled if no option is selected
|
182 |
+
action = st.radio(
|
183 |
+
"Choose an action:",
|
184 |
+
("Submit", "New"),
|
185 |
+
index=None,
|
186 |
+
key="action_radio",
|
187 |
+
disabled=(not st.session_state.submit_enabled and not st.session_state.new_enabled),
|
188 |
+
horizontal=True
|
189 |
+
)
|
|
|
|
|
190 |
|
191 |
# Handle the selected action
|
192 |
if action == "Submit" and st.session_state.submit_enabled:
|