Spaces:
Sleeping
Sleeping
remove chess tool
Browse files
app.py
CHANGED
|
@@ -3,7 +3,7 @@ import gradio as gr
|
|
| 3 |
import requests
|
| 4 |
import inspect
|
| 5 |
import pandas as pd
|
| 6 |
-
from tools import ReverseTextTool, RunPythonFileTool, download_server, wiki_tool
|
| 7 |
from llama_index.llms.gemini import Gemini
|
| 8 |
import os
|
| 9 |
from dotenv import load_dotenv
|
|
@@ -58,7 +58,7 @@ class BasicAgent:
|
|
| 58 |
api_key=gemini_api_key,
|
| 59 |
)
|
| 60 |
agent = FunctionAgent(
|
| 61 |
-
tools=LoadAndSearchToolSpec.from_defaults([ReverseTextTool,RunPythonFileTool,download_server,wiki_tool
|
| 62 |
llm=llm,
|
| 63 |
system_prompt=SYSTEM_PROMPT,
|
| 64 |
)
|
|
|
|
| 3 |
import requests
|
| 4 |
import inspect
|
| 5 |
import pandas as pd
|
| 6 |
+
from tools import ReverseTextTool, RunPythonFileTool, download_server, wiki_tool
|
| 7 |
from llama_index.llms.gemini import Gemini
|
| 8 |
import os
|
| 9 |
from dotenv import load_dotenv
|
|
|
|
| 58 |
api_key=gemini_api_key,
|
| 59 |
)
|
| 60 |
agent = FunctionAgent(
|
| 61 |
+
tools=LoadAndSearchToolSpec.from_defaults([ReverseTextTool,RunPythonFileTool,download_server,wiki_tool]).to_tool_list(),
|
| 62 |
llm=llm,
|
| 63 |
system_prompt=SYSTEM_PROMPT,
|
| 64 |
)
|
tools.py
CHANGED
|
@@ -5,7 +5,7 @@ from llama_index.core.tools.tool_spec.load_and_search import (
|
|
| 5 |
LoadAndSearchToolSpec,
|
| 6 |
)
|
| 7 |
from llama_index.tools.wikipedia import WikipediaToolSpec
|
| 8 |
-
from recognizer import predict_fen
|
| 9 |
|
| 10 |
|
| 11 |
|
|
@@ -13,9 +13,9 @@ wiki_spec = WikipediaToolSpec()
|
|
| 13 |
# Get the search wikipedia tool
|
| 14 |
wiki_tool = wiki_spec.to_tool_list()[1]
|
| 15 |
|
| 16 |
-
def GetChessPosition(file_path:str) -> str:
|
| 17 |
fen = predict_fen("../images/chess_image.png")
|
| 18 |
-
return(fen)
|
| 19 |
|
| 20 |
def ReverseTextTool(text: str) -> str:
|
| 21 |
"""
|
|
|
|
| 5 |
LoadAndSearchToolSpec,
|
| 6 |
)
|
| 7 |
from llama_index.tools.wikipedia import WikipediaToolSpec
|
| 8 |
+
#from recognizer import predict_fen
|
| 9 |
|
| 10 |
|
| 11 |
|
|
|
|
| 13 |
# Get the search wikipedia tool
|
| 14 |
wiki_tool = wiki_spec.to_tool_list()[1]
|
| 15 |
|
| 16 |
+
""" def GetChessPosition(file_path:str) -> str:
|
| 17 |
fen = predict_fen("../images/chess_image.png")
|
| 18 |
+
return(fen) """
|
| 19 |
|
| 20 |
def ReverseTextTool(text: str) -> str:
|
| 21 |
"""
|