throaway2854 commited on
Commit
3e573af
·
verified ·
1 Parent(s): 00039a6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -8
app.py CHANGED
@@ -315,10 +315,10 @@ with gr.Blocks() as demo:
315
  return zip_path, f"Dataset '{current_dataset_name}' is ready for download."
316
 
317
  download_button.click(
318
- download_dataset,
319
- inputs=[current_dataset_name, datasets],
320
- outputs=[download_output, message_box]
321
- )
322
 
323
  # Dataset Viewer and Pagination Controls at the Bottom
324
  with gr.Column():
@@ -343,14 +343,14 @@ with gr.Blocks() as demo:
343
  return current_page_number, gr.update(value=html_content), ""
344
 
345
  prev_button.click(
346
- change_page,
347
- inputs=["prev", current_page_number, datasets, current_dataset_name],
348
  outputs=[current_page_number, dataset_html, message_box]
349
  )
350
 
351
  next_button.click(
352
- change_page,
353
- inputs=["next", current_page_number, datasets, current_dataset_name],
354
  outputs=[current_page_number, dataset_html, message_box]
355
  )
356
 
 
315
  return zip_path, f"Dataset '{current_dataset_name}' is ready for download."
316
 
317
  download_button.click(
318
+ download_dataset,
319
+ inputs=[current_dataset_name, datasets],
320
+ outputs=[download_output, message_box]
321
+ )
322
 
323
  # Dataset Viewer and Pagination Controls at the Bottom
324
  with gr.Column():
 
343
  return current_page_number, gr.update(value=html_content), ""
344
 
345
  prev_button.click(
346
+ fn=lambda current_page_number, datasets, current_dataset_name: change_page("prev", current_page_number, datasets, current_dataset_name),
347
+ inputs=[current_page_number, datasets, current_dataset_name],
348
  outputs=[current_page_number, dataset_html, message_box]
349
  )
350
 
351
  next_button.click(
352
+ fn=lambda current_page_number, datasets, current_dataset_name: change_page("next", current_page_number, datasets, current_dataset_name),
353
+ inputs=[current_page_number, datasets, current_dataset_name],
354
  outputs=[current_page_number, dataset_html, message_box]
355
  )
356