Spaces:
Runtime error
Runtime error
Commit
·
b7d3916
1
Parent(s):
6d2e4ab
Update Home.py
Browse files
Home.py
CHANGED
|
@@ -209,10 +209,10 @@ user_inputs = {
|
|
| 209 |
"difficulty": st.session_state.selected_difficulty
|
| 210 |
}
|
| 211 |
|
| 212 |
-
|
| 213 |
-
with
|
| 214 |
st.button(label='Submit', on_click=generate_recipe, kwargs=dict(user_inputs=user_inputs), type="primary", use_container_width=True)
|
| 215 |
-
with
|
| 216 |
st.button(label='Reset', on_click=clear_inputs, type="secondary", use_container_width=True)
|
| 217 |
|
| 218 |
if st.session_state.gpt_response is not None:
|
|
@@ -234,7 +234,8 @@ if st.session_state.gpt_response is not None:
|
|
| 234 |
disable_button = True
|
| 235 |
else:
|
| 236 |
disable_button = False
|
| 237 |
-
|
|
|
|
| 238 |
st.button("Save Recipe", on_click=save_recipe, disabled=disable_button, type="primary")
|
| 239 |
if st.session_state.recipe_saved == True:
|
| 240 |
st.success("Recipe Saved!")
|
|
|
|
| 209 |
"difficulty": st.session_state.selected_difficulty
|
| 210 |
}
|
| 211 |
|
| 212 |
+
button_cols_submit = st.columns([1, 1, 4])
|
| 213 |
+
with button_cols_submit[0]:
|
| 214 |
st.button(label='Submit', on_click=generate_recipe, kwargs=dict(user_inputs=user_inputs), type="primary", use_container_width=True)
|
| 215 |
+
with button_cols_submit[1]:
|
| 216 |
st.button(label='Reset', on_click=clear_inputs, type="secondary", use_container_width=True)
|
| 217 |
|
| 218 |
if st.session_state.gpt_response is not None:
|
|
|
|
| 234 |
disable_button = True
|
| 235 |
else:
|
| 236 |
disable_button = False
|
| 237 |
+
button_cols_save = st.columns([1, 1, 4])
|
| 238 |
+
with button_cols_save[0]:
|
| 239 |
st.button("Save Recipe", on_click=save_recipe, disabled=disable_button, type="primary")
|
| 240 |
if st.session_state.recipe_saved == True:
|
| 241 |
st.success("Recipe Saved!")
|