Update main.py
Browse files
main.py
CHANGED
@@ -23,7 +23,7 @@ async def LLMistral():
|
|
23 |
os.environ['HUGGINGFACEHUB_API_TOKEN'] = os.environ['HUGGINGFACEHUB_API_TOKEN']
|
24 |
repo_id = "mistralai/Mixtral-8x7B-Instruct-v0.1"
|
25 |
llm = HuggingFaceEndpoint(
|
26 |
-
repo_id=repo_id, max_new_tokens=5300, temperature=0.
|
27 |
)
|
28 |
return llm
|
29 |
|
@@ -49,7 +49,7 @@ async def on_message(message: cl.Message):
|
|
49 |
model = await LLMistral()
|
50 |
|
51 |
agent = create_csv_agent(
|
52 |
-
|
53 |
"./public/ExpeCFA_LP_CAA.csv",
|
54 |
verbose=False,
|
55 |
agent_type=AgentType.ZERO_SHOT_REACT_DESCRIPTION
|
|
|
23 |
os.environ['HUGGINGFACEHUB_API_TOKEN'] = os.environ['HUGGINGFACEHUB_API_TOKEN']
|
24 |
repo_id = "mistralai/Mixtral-8x7B-Instruct-v0.1"
|
25 |
llm = HuggingFaceEndpoint(
|
26 |
+
repo_id=repo_id, max_new_tokens=5300, temperature=0.1, task="text2text-generation", streaming=True
|
27 |
)
|
28 |
return llm
|
29 |
|
|
|
49 |
model = await LLMistral()
|
50 |
|
51 |
agent = create_csv_agent(
|
52 |
+
model,
|
53 |
"./public/ExpeCFA_LP_CAA.csv",
|
54 |
verbose=False,
|
55 |
agent_type=AgentType.ZERO_SHOT_REACT_DESCRIPTION
|