wi-lab commited on
Commit
dcec41c
·
verified ·
1 Parent(s): 5fc4eb8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -3
app.py CHANGED
@@ -361,9 +361,6 @@ def plot_confusion_matrix(y_true, y_pred, title, save_path="confusion_matrix.png
361
  plt.savefig(save_path, bbox_inches='tight', transparent=True)
362
  plt.close()
363
 
364
- # Ensure the file is properly written and synced to disk before opening
365
- time.sleep(0.5) # Add a small delay to ensure file writing is complete
366
-
367
  # Check if the file exists and can be opened
368
  if not os.path.exists(save_path):
369
  raise FileNotFoundError(f"File {save_path} not found.")
 
361
  plt.savefig(save_path, bbox_inches='tight', transparent=True)
362
  plt.close()
363
 
 
 
 
364
  # Check if the file exists and can be opened
365
  if not os.path.exists(save_path):
366
  raise FileNotFoundError(f"File {save_path} not found.")