Update app.py
Browse files
app.py
CHANGED
|
@@ -780,6 +780,8 @@ def train_and_save(
|
|
| 780 |
st.write("Local survival bundle exists:", os.path.exists("survival_bundle.joblib"))
|
| 781 |
if os.path.exists("survival_bundle.joblib"):
|
| 782 |
st.write("Local survival bundle size (bytes):", os.path.getsize("survival_bundle.joblib"))
|
|
|
|
|
|
|
| 783 |
|
| 784 |
return pipe, meta, X_train, y_test, proba
|
| 785 |
|
|
@@ -1011,6 +1013,9 @@ def publish_to_hub(model_repo_id: str, version_tag: str):
|
|
| 1011 |
commit_message=f"Update latest survival model ({version_tag})"
|
| 1012 |
)
|
| 1013 |
|
|
|
|
|
|
|
|
|
|
| 1014 |
|
| 1015 |
return {
|
| 1016 |
"version_model_path": version_model_path,
|
|
@@ -1697,7 +1702,8 @@ with tab_train:
|
|
| 1697 |
st.markdown("**Confusion Matrix (threshold = 0.5)**")
|
| 1698 |
st.dataframe(cm_df)
|
| 1699 |
|
| 1700 |
-
|
|
|
|
| 1701 |
|
| 1702 |
|
| 1703 |
|
|
|
|
| 780 |
st.write("Local survival bundle exists:", os.path.exists("survival_bundle.joblib"))
|
| 781 |
if os.path.exists("survival_bundle.joblib"):
|
| 782 |
st.write("Local survival bundle size (bytes):", os.path.getsize("survival_bundle.joblib"))
|
| 783 |
+
st.write("Local survival bundle exists:", os.path.exists("survival_bundle.joblib"))
|
| 784 |
+
st.json(meta.get("survival", {}))
|
| 785 |
|
| 786 |
return pipe, meta, X_train, y_test, proba
|
| 787 |
|
|
|
|
| 1013 |
commit_message=f"Update latest survival model ({version_tag})"
|
| 1014 |
)
|
| 1015 |
|
| 1016 |
+
files = api.list_repo_files(repo_id=model_repo_id, repo_type="model")
|
| 1017 |
+
|
| 1018 |
+
st.write([f for f in files if "survival" in f])
|
| 1019 |
|
| 1020 |
return {
|
| 1021 |
"version_model_path": version_model_path,
|
|
|
|
| 1702 |
st.markdown("**Confusion Matrix (threshold = 0.5)**")
|
| 1703 |
st.dataframe(cm_df)
|
| 1704 |
|
| 1705 |
+
st.json(meta["survival"])
|
| 1706 |
+
|
| 1707 |
|
| 1708 |
|
| 1709 |
|