Spaces:
Sleeping
Sleeping
Update agent.py
Browse files
agent.py
CHANGED
|
@@ -467,15 +467,14 @@ hf_token = os.getenv("HF_TOKEN")
|
|
| 467 |
from langchain_huggingface import HuggingFaceEndpoint
|
| 468 |
|
| 469 |
# Initialize the HuggingFaceEndpoint with the desired model and parameters
|
| 470 |
-
|
| 471 |
repo_id="Qwen/Qwen2.5-Coder-32B-Instruct",
|
| 472 |
task="text-generation",
|
| 473 |
huggingfacehub_api_token=os.getenv("HF_TOKEN"),
|
| 474 |
temperature=0.7,
|
| 475 |
-
|
| 476 |
)
|
| 477 |
|
| 478 |
-
|
| 479 |
# Initialize the LangChain agent with the tool(s) and the model
|
| 480 |
agent = initialize_agent(
|
| 481 |
tools=tools,
|
|
|
|
| 467 |
from langchain_huggingface import HuggingFaceEndpoint
|
| 468 |
|
| 469 |
# Initialize the HuggingFaceEndpoint with the desired model and parameters
|
| 470 |
+
qwen_model = HuggingFaceEndpoint(
|
| 471 |
repo_id="Qwen/Qwen2.5-Coder-32B-Instruct",
|
| 472 |
task="text-generation",
|
| 473 |
huggingfacehub_api_token=os.getenv("HF_TOKEN"),
|
| 474 |
temperature=0.7,
|
| 475 |
+
max_length=1024
|
| 476 |
)
|
| 477 |
|
|
|
|
| 478 |
# Initialize the LangChain agent with the tool(s) and the model
|
| 479 |
agent = initialize_agent(
|
| 480 |
tools=tools,
|