kpbotla commited on
Commit
9ba8328
·
verified ·
1 Parent(s): 48f52d2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -116,8 +116,8 @@ image_tool = Tool(
116
  )
117
 
118
  repl_tool = PythonREPLTool()
119
-
120
- llm = HuggingFaceHub(repo_id="google/flan-t5-xl", model_kwargs={"temperature": 0.2, "max_length": 1024})
121
 
122
  tools = [wiki_tool, youtube_tool, audio_tool, excel_tool, image_tool, repl_tool]
123
  agent_instance = initialize_agent(tools, llm, agent="zero-shot-react-description", verbose=True)
 
116
  )
117
 
118
  repl_tool = PythonREPLTool()
119
+ hf_token = os.environ.get("HUGGINGFACEHUB_API_TOKEN")
120
+ llm = HuggingFaceHub(repo_id="google/flan-t5-xl", huggingfacehub_api_token=hf_token,model_kwargs={"temperature": 0.2, "max_length": 1024})
121
 
122
  tools = [wiki_tool, youtube_tool, audio_tool, excel_tool, image_tool, repl_tool]
123
  agent_instance = initialize_agent(tools, llm, agent="zero-shot-react-description", verbose=True)