Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -89,12 +89,12 @@ def predict_dose(crop, microalgae_strain, soil_n, soil_p, soil_k, soil_ec, soil_
|
|
| 89 |
# -----------------------------
|
| 90 |
with gr.Blocks(
|
| 91 |
theme=gr.themes.Soft(primary_hue="green", secondary_hue="lime", neutral_hue="gray"),
|
| 92 |
-
title="
|
| 93 |
) as demo:
|
| 94 |
gr.Markdown(
|
| 95 |
"""
|
| 96 |
<div style='text-align:center'>
|
| 97 |
-
<h1 style='color:#00b16a; margin-bottom:8px;'>
|
| 98 |
<p style='color:#555;'>Predict the optimal <b>microalgae dose (g/pot)</b> for Corn based on soil and growth parameters.</p>
|
| 99 |
</div>
|
| 100 |
<hr style='margin: 10px 0;'>
|
|
@@ -128,11 +128,18 @@ with gr.Blocks(
|
|
| 128 |
log_box = gr.Textbox(label="Debug Logs", lines=15)# <-- Add this
|
| 129 |
gr.Markdown(
|
| 130 |
"""
|
| 131 |
-
###
|
| 132 |
-
-
|
| 133 |
-
-
|
| 134 |
-
-
|
| 135 |
-
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 136 |
"""
|
| 137 |
)
|
| 138 |
predict_btn.click(
|
|
|
|
| 89 |
# -----------------------------
|
| 90 |
with gr.Blocks(
|
| 91 |
theme=gr.themes.Soft(primary_hue="green", secondary_hue="lime", neutral_hue="gray"),
|
| 92 |
+
title="Microalgae Dose Prediction"
|
| 93 |
) as demo:
|
| 94 |
gr.Markdown(
|
| 95 |
"""
|
| 96 |
<div style='text-align:center'>
|
| 97 |
+
<h1 style='color:#00b16a; margin-bottom:8px;'>Microalgae — Inference App</h1>
|
| 98 |
<p style='color:#555;'>Predict the optimal <b>microalgae dose (g/pot)</b> for Corn based on soil and growth parameters.</p>
|
| 99 |
</div>
|
| 100 |
<hr style='margin: 10px 0;'>
|
|
|
|
| 128 |
log_box = gr.Textbox(label="Debug Logs", lines=15)# <-- Add this
|
| 129 |
gr.Markdown(
|
| 130 |
"""
|
| 131 |
+
### Input Tips:
|
| 132 |
+
- Select Crop and the used microalgae strain.
|
| 133 |
+
- Enter values for N, P, K, EC, and Moisture.
|
| 134 |
+
- Fill in Chlorophyll (SPAD), Shoot/Root length, Yield, and Relative Yield.
|
| 135 |
+
- (Optional) Add Actual Dose if you want to compare results.
|
| 136 |
+
- Click “Predict Dose” to get results.
|
| 137 |
+
### Output Tips:
|
| 138 |
+
<div>
|
| 139 |
+
<p style="margin:6px 0;"><strong>Predicted Dose:</strong> Model’s suggested microalgae dose (g/pot).</p>
|
| 140 |
+
<p style="margin:6px 0;"><strong>Absolute Error:</strong> Shows how close the prediction is to your actual dose.</p>
|
| 141 |
+
<p style="margin:6px 0;"><strong>Debug Logs:</strong> Displays detailed input and model processing info.</p>
|
| 142 |
+
</div>
|
| 143 |
"""
|
| 144 |
)
|
| 145 |
predict_btn.click(
|