Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -92,7 +92,7 @@ def trigger_incremental_train():
|
|
| 92 |
samples = list(collection.find())
|
| 93 |
samples = [s for s in samples if "image_path" in s and "true_label" in s]
|
| 94 |
|
| 95 |
-
if len(samples) <
|
| 96 |
return "Not enough validated samples (need at least 100)."
|
| 97 |
|
| 98 |
m1 = UNet().to(device)
|
|
@@ -141,7 +141,8 @@ def trigger_incremental_train():
|
|
| 141 |
|
| 142 |
return {
|
| 143 |
"Old Model": eval_old,
|
| 144 |
-
"New Model": eval_new
|
|
|
|
| 145 |
}
|
| 146 |
|
| 147 |
# Gradio interface
|
|
|
|
| 92 |
samples = list(collection.find())
|
| 93 |
samples = [s for s in samples if "image_path" in s and "true_label" in s]
|
| 94 |
|
| 95 |
+
if len(samples) < 1:
|
| 96 |
return "Not enough validated samples (need at least 100)."
|
| 97 |
|
| 98 |
m1 = UNet().to(device)
|
|
|
|
| 141 |
|
| 142 |
return {
|
| 143 |
"Old Model": eval_old,
|
| 144 |
+
"New Model": eval_new,
|
| 145 |
+
"status": "Training completed successfully"
|
| 146 |
}
|
| 147 |
|
| 148 |
# Gradio interface
|