Spaces:
Sleeping
Sleeping
Fixing import error
Browse files
app.py
CHANGED
@@ -24,10 +24,11 @@ def my_custom_tool(arg1:str, arg2:int)-> str: #it's import to specify the return
|
|
24 |
def arxiv_fetch_paper_tool(arxiv_id : str) -> str:
|
25 |
""" An Tool that would fetch research papers from ArXiV collection and parse it and return the PDF text
|
26 |
Args:
|
27 |
-
arxiv_id: id for the arxiv paper
|
28 |
Returns:
|
29 |
-
|
30 |
"""
|
|
|
31 |
loader = ArxivLoader(query=arxiv_id)
|
32 |
docs = loader.load()
|
33 |
title = docs[0].metadata.get("title", "this paper")
|
|
|
24 |
def arxiv_fetch_paper_tool(arxiv_id : str) -> str:
|
25 |
""" An Tool that would fetch research papers from ArXiV collection and parse it and return the PDF text
|
26 |
Args:
|
27 |
+
arxiv_id: id for the arxiv paper which would be like 2312.11805
|
28 |
Returns:
|
29 |
+
text of the paper content and title of the paper
|
30 |
"""
|
31 |
+
from langchain_community.document_loaders import ArxivLoader
|
32 |
loader = ArxivLoader(query=arxiv_id)
|
33 |
docs = loader.load()
|
34 |
title = docs[0].metadata.get("title", "this paper")
|