throaway2854 commited on
Commit
b2f9b37
·
verified ·
1 Parent(s): df6ff27

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -444,7 +444,7 @@ with gr.Blocks() as demo:
444
 
445
  # Update all components when an entry is deleted
446
  def update_all_components_after_delete(current_dataset_name, datasets):
447
- time.sleep(0.5) # Add a small delay
448
  dataset = datasets[current_dataset_name]
449
  html_content = display_dataset_html(dataset, page_number=0)
450
  entry_options = [f"{idx}: {entry['prompt'][:30]}" for idx, entry in enumerate(dataset)]
 
444
 
445
  # Update all components when an entry is deleted
446
  def update_all_components_after_delete(current_dataset_name, datasets):
447
+ time.sleep(2) # Add a small delay to allow other componenets to finish processing
448
  dataset = datasets[current_dataset_name]
449
  html_content = display_dataset_html(dataset, page_number=0)
450
  entry_options = [f"{idx}: {entry['prompt'][:30]}" for idx, entry in enumerate(dataset)]