pavanmutha commited on
Commit
7aa76a9
·
verified ·
1 Parent(s): 4949145

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -18
app.py CHANGED
@@ -224,24 +224,6 @@ def train_model(_):
224
  f.write(report)
225
  return "Report saved to model_report.md"
226
 
227
- fig, ax = plt.subplots(figsize=(6, 4))
228
- ConfusionMatrixDisplay.from_estimator(best_model, X_test, y_test, ax=ax)
229
- plt.savefig("confusion_matrix.png")
230
- wandb.log({"confusion_matrix": wandb.Image("confusion_matrix.png")})
231
-
232
- # Inside your layout:
233
- compare_button = gr.Button("Compare Models")
234
- compare_output = gr.Dataframe()
235
-
236
- compare_button.click(fn=compare_models, outputs=compare_output)
237
-
238
- report_button = gr.Button("Generate Report")
239
- report_status = gr.Textbox()
240
-
241
- report_button.click(
242
- fn=lambda: generate_report(metrics_df, trials_df, common_errors),
243
- outputs=report_status
244
- )
245
 
246
  # Log common misclassifications to wandb
247
  wandb.log({"common_errors": wandb.Table(dataframe=common_errors)})
 
224
  f.write(report)
225
  return "Report saved to model_report.md"
226
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
227
 
228
  # Log common misclassifications to wandb
229
  wandb.log({"common_errors": wandb.Table(dataframe=common_errors)})