UCS2014 commited on
Commit
52623d6
·
verified ·
1 Parent(s): 31631ac

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +22 -7
app.py CHANGED
@@ -52,6 +52,21 @@ st.markdown("""
52
  </style>
53
  """, unsafe_allow_html=True)
54
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
55
  # Hide uploader helper text ("Drag and drop file here", limits, etc.)
56
  st.markdown("""
57
  <style>
@@ -118,7 +133,7 @@ def add_password_gate() -> None:
118
 
119
  st.sidebar.markdown(f"""
120
  <div class="centered-container">
121
- <img src="{inline_logo('logo.png')}" style="width: 100px; height: auto; object-fit: contain;">
122
  <div style='font-weight:800;font-size:1.2rem; margin-top: 10px;'>ST_GeoMech_UCS</div>
123
  <div style='color:#667085;'>Smart Thinking • Secure Access</div>
124
  </div>
@@ -409,7 +424,7 @@ st.session_state.setdefault("dev_preview",False)
409
  # =========================
410
  st.sidebar.markdown(f"""
411
  <div class="centered-container">
412
- <img src="{inline_logo('logo.png')}" style="width: 100px; height: auto; object-fit: contain;">
413
  <div style='font-weight:800;font-size:1.2rem;'>ST_GeoMech_UCS</div>
414
  <div style='color:#667085;'>Real-Time UCS Tracking While Drilling</div>
415
  </div>
@@ -653,11 +668,11 @@ if st.session_state.app_step == "predict":
653
  table = pd.DataFrame({
654
  "Metric": ["# points","Pred min","Pred max","Pred mean","Pred std","OOR %"],
655
  "Value": [sv["n"],
656
- round(sv["pred_min"],2),
657
- round(sv["pred_max"],2),
658
- round(sv["pred_mean"],2),
659
- round(sv["pred_std"],2),
660
- f'{sv["oor"]:.1f}%']
661
  })
662
  st.success("Predictions ready ✓")
663
  df_centered_rounded(table, hide_index=True)
 
52
  </style>
53
  """, unsafe_allow_html=True)
54
 
55
+ # CSS to make sticky headers work correctly by overriding Streamlit's overflow property
56
+ st.markdown("""
57
+ <style>
58
+ /* This targets the main content area */
59
+ .main .block-container {
60
+ overflow: unset !important;
61
+ }
62
+
63
+ /* This targets the vertical block that holds all your elements */
64
+ div[data-testid="stVerticalBlock"] {
65
+ overflow: unset !important;
66
+ }
67
+ </style>
68
+ """, unsafe_allow_html=True)
69
+
70
  # Hide uploader helper text ("Drag and drop file here", limits, etc.)
71
  st.markdown("""
72
  <style>
 
133
 
134
  st.sidebar.markdown(f"""
135
  <div class="centered-container">
136
+ <img src="{inline_logo('logo.png')}" style="width: 200px; height: auto; object-fit: contain;">
137
  <div style='font-weight:800;font-size:1.2rem; margin-top: 10px;'>ST_GeoMech_UCS</div>
138
  <div style='color:#667085;'>Smart Thinking • Secure Access</div>
139
  </div>
 
424
  # =========================
425
  st.sidebar.markdown(f"""
426
  <div class="centered-container">
427
+ <img src="{inline_logo('logo.png')}" style="width: 200px; height: auto; object-fit: contain;">
428
  <div style='font-weight:800;font-size:1.2rem;'>ST_GeoMech_UCS</div>
429
  <div style='color:#667085;'>Real-Time UCS Tracking While Drilling</div>
430
  </div>
 
668
  table = pd.DataFrame({
669
  "Metric": ["# points","Pred min","Pred max","Pred mean","Pred std","OOR %"],
670
  "Value": [sv["n"],
671
+ round(sv["pred_min"],2),
672
+ round(sv["pred_max"],2),
673
+ round(sv["pred_mean"],2),
674
+ round(sv["pred_std"],2),
675
+ f'{sv["oor"]:.1f}%']
676
  })
677
  st.success("Predictions ready ✓")
678
  df_centered_rounded(table, hide_index=True)