Spaces:
Running
on
Zero
Running
on
Zero
Commit
·
78dd0e4
1
Parent(s):
b80a984
Enhance docstrings in format_search_results_json and format_search_results functions for clarity on functionality and parameters
Browse files
app.py
CHANGED
@@ -302,7 +302,13 @@ def find_synergistic_papers(abstract: str, limit=25) -> list[dict]:
|
|
302 |
|
303 |
|
304 |
def format_search_results_json(abstract: str) -> str:
|
305 |
-
"""
|
|
|
|
|
|
|
|
|
|
|
|
|
306 |
try:
|
307 |
papers = find_synergistic_papers(abstract, limit=10)
|
308 |
json_output = json.dumps(papers, indent=2)
|
@@ -313,9 +319,13 @@ def format_search_results_json(abstract: str) -> str:
|
|
313 |
|
314 |
|
315 |
def format_search_results(abstract: str) -> tuple[pd.DataFrame, list[dict]]:
|
316 |
-
"""
|
317 |
-
|
318 |
-
|
|
|
|
|
|
|
|
|
319 |
try:
|
320 |
papers = find_synergistic_papers(abstract)
|
321 |
except ValueError as e:
|
|
|
302 |
|
303 |
|
304 |
def format_search_results_json(abstract: str) -> str:
|
305 |
+
"""Finds papers with Swanson-style bridges.
|
306 |
+
|
307 |
+
Args:
|
308 |
+
abstract (str): The abstract of the paper to find connections for, or a description of the research question.
|
309 |
+
Returns:
|
310 |
+
str: JSON string containing the list of papers with Swanson-style bridges.
|
311 |
+
"""
|
312 |
try:
|
313 |
papers = find_synergistic_papers(abstract, limit=10)
|
314 |
json_output = json.dumps(papers, indent=2)
|
|
|
319 |
|
320 |
|
321 |
def format_search_results(abstract: str) -> tuple[pd.DataFrame, list[dict]]:
|
322 |
+
"""Finds papers with Swanson-style bridges.
|
323 |
+
|
324 |
+
Args:
|
325 |
+
abstract (str): The abstract of the paper to find connections for, or a description of the research question.
|
326 |
+
Returns:
|
327 |
+
tuple: A tuple containing a DataFrame with the search results and a list of original paper data.
|
328 |
+
"""
|
329 |
try:
|
330 |
papers = find_synergistic_papers(abstract)
|
331 |
except ValueError as e:
|