UCS2014 commited on
Commit
6232ca3
·
verified ·
1 Parent(s): af9afd8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +17 -10
app.py CHANGED
@@ -177,7 +177,9 @@ def _build_alias_map(canonical_features: list[str], target_name: str) -> dict:
177
  can_SPP = pick(canonical_features, ["SPP (psi)", "SPP(psi)"])
178
  can_RPM = pick(canonical_features, ["RPM (1/min)", "RPM(1/min)"])
179
  can_ROP = pick(canonical_features, ["ROP (ft/h)", "ROP(ft/h)"])
180
- can_FR = pick(canonical_features, ["Flow Rate (gpm)", "Flow Rate, gpm", "Flow Rate,gpm", "Flow Rate , gpm", "Fow Rate, gpm", "Fow Rate, gpm "])
 
 
181
  can_DEPTH = "Depth (ft)"
182
 
183
  alias = {
@@ -192,17 +194,22 @@ def _build_alias_map(canonical_features: list[str], target_name: str) -> dict:
192
 
193
  # Depth (plot only)
194
  "Depth (ft)": can_DEPTH, "Depth, ft": can_DEPTH, "Depth(ft)": can_DEPTH, "DEPTH, ft": can_DEPTH,
195
-
196
- # Target family (RHOB)
197
- "RHOB": target_name,
198
- "RHOB (g/cc)": target_name,
199
- "RHOB_Actual": target_name,
200
- "RHOB (g/cc)_Actual": target_name,
201
- "RhoB": target_name,
202
- "RhoB (g/cc)": target_name,
203
  }
 
 
 
 
 
 
 
 
 
 
 
204
  return alias
205
 
 
 
206
  def _normalize_columns(df: pd.DataFrame, canonical_features: list[str], target_name: str) -> pd.DataFrame:
207
  out = df.copy()
208
  out.columns = [str(c).strip().replace(" ,", ",").replace(", ", ", ").replace(" ", " ") for c in out.columns]
@@ -680,7 +687,7 @@ def sticky_header(title, message):
680
  # =========================
681
  if st.session_state.app_step == "intro":
682
  st.header("Welcome!")
683
- st.markdown("This software is developed by *Smart Thinking AI-Solutions Team* to estimate **RHOB (Bulk Density)** from drilling data.")
684
  st.subheader("How It Works")
685
  st.markdown(
686
  "1) **Upload your data to build the case and preview the model performance.** \n"
 
177
  can_SPP = pick(canonical_features, ["SPP (psi)", "SPP(psi)"])
178
  can_RPM = pick(canonical_features, ["RPM (1/min)", "RPM(1/min)"])
179
  can_ROP = pick(canonical_features, ["ROP (ft/h)", "ROP(ft/h)"])
180
+ can_FR = pick(canonical_features, [
181
+ "Flow Rate (gpm)","Flow Rate, gpm","Flow Rate,gpm","Flow Rate , gpm","Fow Rate, gpm","Fow Rate, gpm "
182
+ ])
183
  can_DEPTH = "Depth (ft)"
184
 
185
  alias = {
 
194
 
195
  # Depth (plot only)
196
  "Depth (ft)": can_DEPTH, "Depth, ft": can_DEPTH, "Depth(ft)": can_DEPTH, "DEPTH, ft": can_DEPTH,
 
 
 
 
 
 
 
 
197
  }
198
+
199
+ # ---- Target family (RHOB) ----
200
+ target_variants = [
201
+ "RHOB", "RHOB (g/cc)", "RHOB (g/cm3)", "RHOB (g/cm³)",
202
+ "RHOB_Actual", "RHOB_Actual (g/cc)", "RHOB_Actual (g/cm3)", "RHOB_Actual(g/cc)", "RHOB_Actual(g/cm3)",
203
+ "RhoB", "RhoB (g/cc)", "RhoB (g/cm3)",
204
+ "RhoB_Actual", "RhoB_Actual (g/cc)", "RhoB_Actual (g/cm3)"
205
+ ]
206
+ for t in target_variants:
207
+ alias[t] = target_name
208
+
209
  return alias
210
 
211
+
212
+
213
  def _normalize_columns(df: pd.DataFrame, canonical_features: list[str], target_name: str) -> pd.DataFrame:
214
  out = df.copy()
215
  out.columns = [str(c).strip().replace(" ,", ",").replace(", ", ", ").replace(" ", " ") for c in out.columns]
 
687
  # =========================
688
  if st.session_state.app_step == "intro":
689
  st.header("Welcome!")
690
+ st.markdown("This software is developed by *Smart Thinking AI-Solutions Team* to estimate **RHOB (Formation Bulk Density)** from drilling data.")
691
  st.subheader("How It Works")
692
  st.markdown(
693
  "1) **Upload your data to build the case and preview the model performance.** \n"