Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -42,6 +42,9 @@ def predict_linear(strain, dose, soil_n, soil_p, soil_k, ph,
|
|
| 42 |
if any(v is None for v in required):
|
| 43 |
logs.append("[DEBUG] Missing numeric inputs!")
|
| 44 |
return pd.DataFrame(), "\n⚠️ Fill all required inputs", "\n".join(logs)
|
|
|
|
|
|
|
|
|
|
| 45 |
logs.append("[DEBUG] Inputs received.")
|
| 46 |
|
| 47 |
# Prepare DataFrame for model
|
|
@@ -114,7 +117,7 @@ with gr.Blocks(
|
|
| 114 |
label="Select Strain",
|
| 115 |
value=strain_names[0] # default: Tetradesmus nigardi
|
| 116 |
)
|
| 117 |
-
row_selector = gr.Dropdown(row_options, label="Select Row", value="None, Enter Manually")
|
| 118 |
|
| 119 |
gr.Markdown("### Input Parameters")
|
| 120 |
dose = gr.Number(label="Dose (g/pot)")
|
|
|
|
| 42 |
if any(v is None for v in required):
|
| 43 |
logs.append("[DEBUG] Missing numeric inputs!")
|
| 44 |
return pd.DataFrame(), "\n⚠️ Fill all required inputs", "\n".join(logs)
|
| 45 |
+
if any(v is 0 for v in required):
|
| 46 |
+
logs.append("[DEBUG] Missing numeric inputs!")
|
| 47 |
+
return pd.DataFrame(), "\n⚠️ Fill all required inputs", "\n".join(logs)
|
| 48 |
logs.append("[DEBUG] Inputs received.")
|
| 49 |
|
| 50 |
# Prepare DataFrame for model
|
|
|
|
| 117 |
label="Select Strain",
|
| 118 |
value=strain_names[0] # default: Tetradesmus nigardi
|
| 119 |
)
|
| 120 |
+
# row_selector = gr.Dropdown(row_options, label="Select Row", value="None, Enter Manually")
|
| 121 |
|
| 122 |
gr.Markdown("### Input Parameters")
|
| 123 |
dose = gr.Number(label="Dose (g/pot)")
|