kpbotla commited on
Commit
3a5c1f1
·
verified ·
1 Parent(s): 8ebc565

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -32,7 +32,9 @@ from langchain.agents import initialize_agent, Tool
32
 
33
 
34
  from langchain_community.llms import HuggingFaceHub
35
- from langchain_community.tools import PythonREPL
 
 
36
 
37
  # (Keep Constants as is)
38
  # --- Constants ---
@@ -111,7 +113,7 @@ image_tool = Tool(
111
  description="Use to describe an image (e.g., chessboard layout or other visual input)."
112
  )
113
 
114
- repl_tool = PythonREPL()
115
 
116
  llm = HuggingFaceHub(repo_id="google/flan-t5-xl", model_kwargs={"temperature": 0.2, "max_length": 1024})
117
 
 
32
 
33
 
34
  from langchain_community.llms import HuggingFaceHub
35
+ #from langchain_community.tools import PythonREPL
36
+
37
+ from langchain_community.tools.python.tool import PythonREPLTool
38
 
39
  # (Keep Constants as is)
40
  # --- Constants ---
 
113
  description="Use to describe an image (e.g., chessboard layout or other visual input)."
114
  )
115
 
116
+ repl_tool = PythonREPLTool()
117
 
118
  llm = HuggingFaceHub(repo_id="google/flan-t5-xl", model_kwargs={"temperature": 0.2, "max_length": 1024})
119