Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -149,18 +149,7 @@ with tab1:
|
|
| 149 |
with tab2:
|
| 150 |
st.header("Manual Single Prediction")
|
| 151 |
st.info(f"Using model: {model_option}")
|
| 152 |
-
|
| 153 |
-
# Well depth dictionary
|
| 154 |
-
well_depths = {
|
| 155 |
-
"J05": 1996.0,
|
| 156 |
-
"J19": 2208.0,
|
| 157 |
-
"J37": 2099.0,
|
| 158 |
-
"J51": 2101.0,
|
| 159 |
-
"J56": 2188.0,
|
| 160 |
-
"J57": 2058.0,
|
| 161 |
-
"Custom": None # Allows manual entry
|
| 162 |
-
}
|
| 163 |
-
|
| 164 |
with st.form("manual_prediction_form"):
|
| 165 |
col1, col2 = st.columns(2)
|
| 166 |
|
|
@@ -170,14 +159,7 @@ with tab2:
|
|
| 170 |
depth_disabled = selected_well != "Custom"
|
| 171 |
default_depth = well_depths[selected_well] if selected_well != "Custom" else 0.0
|
| 172 |
|
| 173 |
-
|
| 174 |
-
"Depth (m)",
|
| 175 |
-
min_value=0.0,
|
| 176 |
-
value=default_depth,
|
| 177 |
-
disabled=depth_disabled,
|
| 178 |
-
key="manual_depth", # key added to avoid conflicts
|
| 179 |
-
help="Automatically filled for predefined wells"
|
| 180 |
-
)
|
| 181 |
|
| 182 |
qo = st.number_input("Oil Rate (Qo, STB/d)", min_value=0.0)
|
| 183 |
gor = st.number_input("Gas-Oil Ratio (GOR, scf/STB)", min_value=0.0)
|
|
@@ -186,6 +168,7 @@ with tab2:
|
|
| 186 |
tht = st.number_input("Tubing Head Temperature (THT, °C)", min_value=0.0)
|
| 187 |
pwh = st.number_input("Wellhead Pressure (Pwh, psi)", min_value=0.0)
|
| 188 |
wct = st.number_input("Water Cut (WCT, %)", min_value=0.0, max_value=100.0)
|
|
|
|
| 189 |
|
| 190 |
submitted = st.form_submit_button("Predict BHP")
|
| 191 |
|
|
|
|
| 149 |
with tab2:
|
| 150 |
st.header("Manual Single Prediction")
|
| 151 |
st.info(f"Using model: {model_option}")
|
| 152 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 153 |
with st.form("manual_prediction_form"):
|
| 154 |
col1, col2 = st.columns(2)
|
| 155 |
|
|
|
|
| 159 |
depth_disabled = selected_well != "Custom"
|
| 160 |
default_depth = well_depths[selected_well] if selected_well != "Custom" else 0.0
|
| 161 |
|
| 162 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 163 |
|
| 164 |
qo = st.number_input("Oil Rate (Qo, STB/d)", min_value=0.0)
|
| 165 |
gor = st.number_input("Gas-Oil Ratio (GOR, scf/STB)", min_value=0.0)
|
|
|
|
| 168 |
tht = st.number_input("Tubing Head Temperature (THT, °C)", min_value=0.0)
|
| 169 |
pwh = st.number_input("Wellhead Pressure (Pwh, psi)", min_value=0.0)
|
| 170 |
wct = st.number_input("Water Cut (WCT, %)", min_value=0.0, max_value=100.0)
|
| 171 |
+
depth = st.number_input("Depth m", min_value=0.0, max_value=10000.0)
|
| 172 |
|
| 173 |
submitted = st.form_submit_button("Predict BHP")
|
| 174 |
|