Update app.py
Browse filesChanged typing to help the models to get to the right conclussion
app.py
CHANGED
|
@@ -6,7 +6,7 @@ from smolagents import CodeAgent, HfApiModel, load_tool, tool
|
|
| 6 |
import yaml
|
| 7 |
import wikipedia
|
| 8 |
from tools.final_answer import FinalAnswerTool
|
| 9 |
-
|
| 10 |
from Gradio_UI import GradioUI
|
| 11 |
|
| 12 |
|
|
@@ -18,9 +18,9 @@ from Gradio_UI import GradioUI
|
|
| 18 |
# from Gradio_UI import GradioUI
|
| 19 |
|
| 20 |
@tool
|
| 21 |
-
def search_wikipedia_pages(search_string: str) ->
|
| 22 |
"""This tool helps to search for wikipedia pages related to a search string.
|
| 23 |
-
The output are the first 10 pages related to the search string.
|
| 24 |
Args:
|
| 25 |
search_string: the search string
|
| 26 |
"""
|
|
|
|
| 6 |
import yaml
|
| 7 |
import wikipedia
|
| 8 |
from tools.final_answer import FinalAnswerTool
|
| 9 |
+
from typing import List
|
| 10 |
from Gradio_UI import GradioUI
|
| 11 |
|
| 12 |
|
|
|
|
| 18 |
# from Gradio_UI import GradioUI
|
| 19 |
|
| 20 |
@tool
|
| 21 |
+
def search_wikipedia_pages(search_string: str) -> List[str]:
|
| 22 |
"""This tool helps to search for wikipedia pages related to a search string.
|
| 23 |
+
The output are the first 10 pages related to the search string in a list of strings.
|
| 24 |
Args:
|
| 25 |
search_string: the search string
|
| 26 |
"""
|