Spaces:
Running
Running
Updated New app.py
Browse files
app.py
CHANGED
@@ -8,7 +8,7 @@ from scholarly import scholarly
|
|
8 |
import gradio as gr
|
9 |
|
10 |
@tool
|
11 |
-
def fetch_latest_research_papers(keywords: list, num_results: int =
|
12 |
"""Fetches the latest research papers from Google Scholar based on provided keywords.
|
13 |
Args:
|
14 |
keywords: A list of keywords to search for relevant papers.
|
@@ -58,7 +58,7 @@ agent = CodeAgent(
|
|
58 |
|
59 |
def search_papers(user_input):
|
60 |
keywords = user_input.split(",") # Split input by commas for multiple keywords
|
61 |
-
results = fetch_latest_research_papers(keywords, num_results=
|
62 |
return "\n\n".join([f"**Title:** {paper['title']}\n**Authors:** {paper['authors']}\n**Year:** {paper['year']}\n**Abstract:** {paper['abstract']}\n[Read More]({paper['link']})" for paper in results])
|
63 |
|
64 |
# Create a simple Gradio interface
|
|
|
8 |
import gradio as gr
|
9 |
|
10 |
@tool
|
11 |
+
def fetch_latest_research_papers(keywords: list, num_results: int = 1) -> list:
|
12 |
"""Fetches the latest research papers from Google Scholar based on provided keywords.
|
13 |
Args:
|
14 |
keywords: A list of keywords to search for relevant papers.
|
|
|
58 |
|
59 |
def search_papers(user_input):
|
60 |
keywords = user_input.split(",") # Split input by commas for multiple keywords
|
61 |
+
results = fetch_latest_research_papers(keywords, num_results=1)
|
62 |
return "\n\n".join([f"**Title:** {paper['title']}\n**Authors:** {paper['authors']}\n**Year:** {paper['year']}\n**Abstract:** {paper['abstract']}\n[Read More]({paper['link']})" for paper in results])
|
63 |
|
64 |
# Create a simple Gradio interface
|