mlbench123 commited on
Commit
9a8025e
·
verified ·
1 Parent(s): 3fb3dfe

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -2
app.py CHANGED
@@ -339,9 +339,15 @@ def create_interface():
339
  outputs=[status_output, json_output, display_output]
340
  )
341
 
342
- # Example button action
343
  def load_example():
344
- return "example1.pdf"
 
 
 
 
 
 
 
345
 
346
  example_btn.click(
347
  fn=load_example,
 
339
  outputs=[status_output, json_output, display_output]
340
  )
341
 
 
342
  def load_example():
343
+ example_path = "example1.pdf"
344
+ if os.path.exists(example_path):
345
+ # Return list of file paths for multiple file input
346
+ return [example_path]
347
+ else:
348
+ # If example doesn't exist, return empty list
349
+ print(f"Warning: Example file '{example_path}' not found")
350
+ return []
351
 
352
  example_btn.click(
353
  fn=load_example,