Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -36,7 +36,7 @@ head_height = headrace_level - tailrace_level
|
|
| 36 |
st.write(f"Effective Head Height: {head_height:.2f} m")
|
| 37 |
|
| 38 |
# Prepare input data
|
| 39 |
-
input_data = np.array([[flow_rate, head_height, EFFICIENCY
|
| 40 |
|
| 41 |
# Predict energy output using ONNX model
|
| 42 |
if st.button("Predict Energy Output (Local ONNX Model)"):
|
|
@@ -70,7 +70,7 @@ if st.button("Generate Prediction Graph"):
|
|
| 70 |
hourly_predictions = []
|
| 71 |
|
| 72 |
for hourly_flow in river_flows:
|
| 73 |
-
hourly_input = np.array([[hourly_flow, head_height, EFFICIENCY
|
| 74 |
hourly_result = onnx_session.run(None, {input_name: hourly_input})
|
| 75 |
hourly_predictions.append(float(hourly_result[0][0]))
|
| 76 |
|
|
|
|
| 36 |
st.write(f"Effective Head Height: {head_height:.2f} m")
|
| 37 |
|
| 38 |
# Prepare input data
|
| 39 |
+
input_data = np.array([[flow_rate, head_height, EFFICIENCY]], dtype=np.float32)
|
| 40 |
|
| 41 |
# Predict energy output using ONNX model
|
| 42 |
if st.button("Predict Energy Output (Local ONNX Model)"):
|
|
|
|
| 70 |
hourly_predictions = []
|
| 71 |
|
| 72 |
for hourly_flow in river_flows:
|
| 73 |
+
hourly_input = np.array([[hourly_flow, head_height, EFFICIENCY]], dtype=np.float32)
|
| 74 |
hourly_result = onnx_session.run(None, {input_name: hourly_input})
|
| 75 |
hourly_predictions.append(float(hourly_result[0][0]))
|
| 76 |
|