Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -56,8 +56,13 @@ def run_dare_demo(delete_index=25):
|
|
| 56 |
start_retrain = time.perf_counter()
|
| 57 |
retrain_model.fit(X_retrain, y_retrain)
|
| 58 |
retrain_time = time.perf_counter() - start_retrain
|
|
|
|
|
|
|
|
|
|
|
|
|
| 59 |
|
| 60 |
logs += f"\n🔁 Retraining completed in {retrain_time:.5f} seconds (without index {delete_index})\n"
|
|
|
|
| 61 |
except Exception as e:
|
| 62 |
logs += f"\n⚠️ Error during retraining: {str(e)}\n"
|
| 63 |
|
|
|
|
| 56 |
start_retrain = time.perf_counter()
|
| 57 |
retrain_model.fit(X_retrain, y_retrain)
|
| 58 |
retrain_time = time.perf_counter() - start_retrain
|
| 59 |
+
|
| 60 |
+
y_pred_retrain = retrain_model.predict(X_test)
|
| 61 |
+
acc_retrain = accuracy_score(y_test, y_pred_retrain)
|
| 62 |
+
|
| 63 |
|
| 64 |
logs += f"\n🔁 Retraining completed in {retrain_time:.5f} seconds (without index {delete_index})\n"
|
| 65 |
+
logs += f"🎯 Accuracy after retraining: {acc_retrain:.4f}\n"
|
| 66 |
except Exception as e:
|
| 67 |
logs += f"\n⚠️ Error during retraining: {str(e)}\n"
|
| 68 |
|