UCS2014 commited on
Commit
4014d69
·
verified ·
1 Parent(s): 819f89a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +25 -18
app.py CHANGED
@@ -39,6 +39,13 @@ st.set_page_config(page_title="ST_GeoMech_UCS", page_icon="logo.png", layout="wi
39
  # This is the new CSS block for the sticky header and message box
40
  st.markdown("""
41
  <style>
 
 
 
 
 
 
 
42
  /* CSS to make the header sticky */
43
  .fixed-header-container {
44
  position: sticky;
@@ -87,18 +94,18 @@ section[data-testid="stFileUploader"] p, section[data-testid="stFileUploader"] s
87
  st.markdown("""
88
  <style>
89
  div[data-testid="stExpander"] > details > summary {
90
- position: sticky;
91
- top: 0;
92
- z-index: 10;
93
- background: #fff;
94
- border-bottom: 1px solid #eee;
95
  }
96
  div[data-testid="stExpander"] div[data-baseweb="tab-list"] {
97
- position: sticky;
98
- top: 42px; /* adjust if your expander header height differs */
99
- z-index: 9;
100
- background: #fff;
101
- padding-top: 6px;
102
  }
103
  </style>
104
  """, unsafe_allow_html=True)
@@ -136,7 +143,7 @@ def add_password_gate() -> None:
136
  st.sidebar.markdown(f"""
137
  <div class="centered-container">
138
  <img src="{inline_logo('logo.png')}" style="width: 200px; height: auto; object-fit: contain;">
139
- <div style='font-weight:800;font-size:1.2rem; margin-top: 10px;'>ST_GeoMech_UCS</div>
140
  <div style='color:#667085;'>Smart Thinking • Secure Access</div>
141
  </div>
142
  """, unsafe_allow_html=True
@@ -427,7 +434,7 @@ st.session_state.setdefault("dev_preview",False)
427
  st.sidebar.markdown(f"""
428
  <div class="centered-container">
429
  <img src="{inline_logo('logo.png')}" style="width: 200px; height: auto; object-fit: contain;">
430
- <div style='font-weight:800;font-size:1.2rem;'>ST_GeoMech_UCS</div>
431
  <div style='color:#667085;'>Real-Time UCS Tracking While Drilling</div>
432
  </div>
433
  """, unsafe_allow_html=True
@@ -666,11 +673,11 @@ if st.session_state.app_step == "predict":
666
  table = pd.DataFrame({
667
  "Metric": ["# points","Pred min","Pred max","Pred mean","Pred std","OOR %"],
668
  "Value": [sv["n"],
669
- round(sv["pred_min"],2),
670
- round(sv["pred_max"],2),
671
- round(sv["pred_mean"],2),
672
- round(sv["pred_std"],2),
673
- f'{sv["oor"]:.1f}%']
674
  })
675
  st.success("Predictions ready ✓")
676
  df_centered_rounded(table, hide_index=True)
@@ -693,4 +700,4 @@ st.markdown(
693
  </div>
694
  """,
695
  unsafe_allow_html=True
696
- )
 
39
  # This is the new CSS block for the sticky header and message box
40
  st.markdown("""
41
  <style>
42
+ /* CSS for the main app title in the sidebar and password gate */
43
+ .app-title {
44
+ color: #ADD8E6; /* Light blue color for the title */
45
+ font-weight:800;
46
+ font-size:1.2rem;
47
+ }
48
+
49
  /* CSS to make the header sticky */
50
  .fixed-header-container {
51
  position: sticky;
 
94
  st.markdown("""
95
  <style>
96
  div[data-testid="stExpander"] > details > summary {
97
+ position: sticky;
98
+ top: 0;
99
+ z-index: 10;
100
+ background: #fff;
101
+ border-bottom: 1px solid #eee;
102
  }
103
  div[data-testid="stExpander"] div[data-baseweb="tab-list"] {
104
+ position: sticky;
105
+ top: 42px; /* adjust if your expander header height differs */
106
+ z-index: 9;
107
+ background: #fff;
108
+ padding-top: 6px;
109
  }
110
  </style>
111
  """, unsafe_allow_html=True)
 
143
  st.sidebar.markdown(f"""
144
  <div class="centered-container">
145
  <img src="{inline_logo('logo.png')}" style="width: 200px; height: auto; object-fit: contain;">
146
+ <div class='app-title' style='margin-top: 10px;'>ST_GeoMech_UCS</div>
147
  <div style='color:#667085;'>Smart Thinking • Secure Access</div>
148
  </div>
149
  """, unsafe_allow_html=True
 
434
  st.sidebar.markdown(f"""
435
  <div class="centered-container">
436
  <img src="{inline_logo('logo.png')}" style="width: 200px; height: auto; object-fit: contain;">
437
+ <div class='app-title'>ST_GeoMech_UCS</div>
438
  <div style='color:#667085;'>Real-Time UCS Tracking While Drilling</div>
439
  </div>
440
  """, unsafe_allow_html=True
 
673
  table = pd.DataFrame({
674
  "Metric": ["# points","Pred min","Pred max","Pred mean","Pred std","OOR %"],
675
  "Value": [sv["n"],
676
+ round(sv["pred_min"],2),
677
+ round(sv["pred_max"],2),
678
+ round(sv["pred_mean"],2),
679
+ round(sv["pred_std"],2),
680
+ f'{sv["oor"]:.1f}%']
681
  })
682
  st.success("Predictions ready ✓")
683
  df_centered_rounded(table, hide_index=True)
 
700
  </div>
701
  """,
702
  unsafe_allow_html=True
703
+ )