Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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)
|