Skip to content

Commit

Permalink
patch: WebUI save fix (#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
FBruzzesi authored Jun 13, 2024
1 parent 4086a8c commit d192c45
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions sksmithy/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,16 @@
)
if forge_btn:
st.session_state["forge_counter"] += 1
st.session_state["forged_template"] = render_template(
name=name,
estimator_type=estimator_type, # type: ignore[arg-type] # At this point estimator_type is never None.
required=required,
optional=optional,
linear=linear,
sample_weight=sample_weight,
predict_proba=predict_proba,
decision_function=decision_function,
)

with c54, st.popover(label="Download", disabled=not st.session_state["forge_counter"]):
if name:
Expand All @@ -252,6 +262,7 @@
file_name=file_name,
key="download_btn",
)

with st.container(): # code output
if forge_btn:
st.toast("Request submitted!")
Expand All @@ -264,16 +275,6 @@
time.sleep(0.002)
progress_bar.progress(percent_complete + 1, text=progress_text)

st.session_state["forged_template"] = render_template(
name=name,
estimator_type=estimator_type, # type: ignore[arg-type] # At this point estimator_type is never None.
required=required,
optional=optional,
linear=linear,
sample_weight=sample_weight,
predict_proba=predict_proba,
decision_function=decision_function,
)
time.sleep(0.2)
progress_bar.empty()

Expand Down

0 comments on commit d192c45

Please sign in to comment.