Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

patch: WebUI save fix #27

Merged
merged 1 commit into from
Jun 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
patch: WebUI save fix
  • Loading branch information
FBruzzesi committed Jun 13, 2024
commit d8b0e66b5c58fc1e4da4768adae4e9f49b60dc6b
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