Spaces:
Running
on
Zero
Running
on
Zero
Commit
·
bfab353
1
Parent(s):
3a2f25f
Refactor error handling in format_search_results function to return structured error messages
Browse files
app.py
CHANGED
@@ -480,7 +480,8 @@ def format_search_results(abstract: str) -> tuple[pd.DataFrame, list[dict]]:
|
|
480 |
except ValueError as e:
|
481 |
error_message = str(e)
|
482 |
df = pd.DataFrame(
|
483 |
-
[{"Title": error_message, "Authors": "", "Categories": "", "Date": "", "Match Score": ""}]
|
|
|
484 |
)
|
485 |
return df, []
|
486 |
|
|
|
480 |
except ValueError as e:
|
481 |
error_message = str(e)
|
482 |
df = pd.DataFrame(
|
483 |
+
# [{"Title": error_message, "Authors": "", "Categories": "", "Date": "", "Match Score": ""}]
|
484 |
+
[{"Error": error_message}]
|
485 |
)
|
486 |
return df, []
|
487 |
|