Spaces:
Running
Running
Update app.py
Browse files
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 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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,
|