knight7561 commited on
Commit
8e3d71f
·
verified ·
1 Parent(s): a64fa62

Fixing import error

Browse files
Files changed (1) hide show
  1. app.py +3 -2
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
- text of the paper content and title of the paper
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")