Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -52,7 +52,10 @@ from smolagents import CodeAgent, HfApiModel, tool
|
|
52 |
from rank_bm25 import BM25Okapi
|
53 |
import nltk
|
54 |
|
55 |
-
|
|
|
|
|
|
|
56 |
|
57 |
@tool # Register the function properly as a SmolAgents tool
|
58 |
def fetch_latest_arxiv_papers(keywords: list, num_results: int = 5) -> list:
|
|
|
52 |
from rank_bm25 import BM25Okapi
|
53 |
import nltk
|
54 |
|
55 |
+
try:
|
56 |
+
nltk.data.find("tokenizers/punkt")
|
57 |
+
except LookupError:
|
58 |
+
nltk.download("punkt")
|
59 |
|
60 |
@tool # Register the function properly as a SmolAgents tool
|
61 |
def fetch_latest_arxiv_papers(keywords: list, num_results: int = 5) -> list:
|