Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -20,10 +20,10 @@ from sklearn.metrics import mean_squared_error # MAE removed
|
|
| 20 |
# =========================
|
| 21 |
# Constants / Defaults
|
| 22 |
# =========================
|
| 23 |
-
APP_NAME = "
|
| 24 |
-
TAGLINE = "
|
| 25 |
|
| 26 |
-
FEATURES = ["AHT90", "DT", "GR", "K", "RHOB", "TNPH", "Th", "Ur"]
|
| 27 |
TARGET = "TOC"
|
| 28 |
PRED_COL = "TOC_Pred"
|
| 29 |
|
|
@@ -382,7 +382,7 @@ def render_export_button(phase_key: str) -> None:
|
|
| 382 |
st.download_button(
|
| 383 |
label="⬇️ Export Excel",
|
| 384 |
data=b"",
|
| 385 |
-
file_name="
|
| 386 |
mime="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
| 387 |
disabled=True,
|
| 388 |
key=f"download_{phase_key}",
|
|
@@ -568,7 +568,7 @@ def ensure_model() -> Path|None:
|
|
| 568 |
|
| 569 |
mpath = ensure_model()
|
| 570 |
if not mpath:
|
| 571 |
-
st.error("Model not found. Upload models/
|
| 572 |
st.stop()
|
| 573 |
try:
|
| 574 |
model = load_model(str(mpath))
|
|
@@ -646,12 +646,12 @@ def sticky_header(title, message):
|
|
| 646 |
# =========================
|
| 647 |
if st.session_state.app_step == "intro":
|
| 648 |
st.header("Welcome!")
|
| 649 |
-
st.markdown("This software is developed by *Smart Thinking AI-Solutions Team* to estimate **
|
| 650 |
st.subheader("How It Works")
|
| 651 |
st.markdown(
|
| 652 |
"1) **Upload your data to build the case and preview the model performance.** \n"
|
| 653 |
"2) Click **Run Model** to compute metrics and plots. \n"
|
| 654 |
-
"3) **Proceed to Validation** (with actual
|
| 655 |
)
|
| 656 |
if st.button("Start Showcase", type="primary"):
|
| 657 |
st.session_state.app_step = "dev"; st.rerun()
|
|
|
|
| 20 |
# =========================
|
| 21 |
# Constants / Defaults
|
| 22 |
# =========================
|
| 23 |
+
APP_NAME = "ST_TOC"
|
| 24 |
+
TAGLINE = "Total Organic Carbon Estimation Using AI"
|
| 25 |
|
| 26 |
+
FEATURES = ["AHT90 (Average Hydrocarbon Tool 90° Phase)", "DT (Delta-T Sonic Travel Time)", "GR (Gamma Ray)", "K (Potassium)", "RHOB (Bulk Density)", "TNPH (Thermal Neutron Porosity)", "Th (Thorium)", "Ur (Uranium)"]
|
| 27 |
TARGET = "TOC"
|
| 28 |
PRED_COL = "TOC_Pred"
|
| 29 |
|
|
|
|
| 382 |
st.download_button(
|
| 383 |
label="⬇️ Export Excel",
|
| 384 |
data=b"",
|
| 385 |
+
file_name="TOC_Export.xlsx",
|
| 386 |
mime="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
| 387 |
disabled=True,
|
| 388 |
key=f"download_{phase_key}",
|
|
|
|
| 568 |
|
| 569 |
mpath = ensure_model()
|
| 570 |
if not mpath:
|
| 571 |
+
st.error("Model not found. Upload models/toc_rf.joblib (or set MODEL_URL).")
|
| 572 |
st.stop()
|
| 573 |
try:
|
| 574 |
model = load_model(str(mpath))
|
|
|
|
| 646 |
# =========================
|
| 647 |
if st.session_state.app_step == "intro":
|
| 648 |
st.header("Welcome!")
|
| 649 |
+
st.markdown("This software is developed by *Smart Thinking AI-Solutions Team* to estimate **Total Organic Carbon (TOC)** from logging data.")
|
| 650 |
st.subheader("How It Works")
|
| 651 |
st.markdown(
|
| 652 |
"1) **Upload your data to build the case and preview the model performance.** \n"
|
| 653 |
"2) Click **Run Model** to compute metrics and plots. \n"
|
| 654 |
+
"3) **Proceed to Validation** (with actual TOC) or **Proceed to Prediction** (no TOC)."
|
| 655 |
)
|
| 656 |
if st.button("Start Showcase", type="primary"):
|
| 657 |
st.session_state.app_step = "dev"; st.rerun()
|