Spaces:
Sleeping
Sleeping
jesusgj
commited on
Commit
·
a57640e
1
Parent(s):
52723c6
Modified files
Browse files
agent.py
CHANGED
|
@@ -17,7 +17,7 @@ def initialize_agent():
|
|
| 17 |
|
| 18 |
# 1. Load the model
|
| 19 |
# Make sure to set HF_TOKEN in your Hugging Face Space secrets
|
| 20 |
-
model_name = "
|
| 21 |
try:
|
| 22 |
model = InferenceClientModel(model_id=model_name, token=os.environ.get("HF_TOKEN"), provider="together")
|
| 23 |
except Exception as e:
|
|
@@ -115,8 +115,8 @@ def initialize_agent():
|
|
| 115 |
model=model,
|
| 116 |
managed_agents=[web_agent],
|
| 117 |
additional_authorized_imports=["time", "numpy", "pandas"],
|
| 118 |
-
instructions='''You are a general AI assistant. I will ask you a question. Report your thoughts, and finish your answer with the a new line and the following template: FINAL ANSWER: [YOUR FINAL ANSWER]. YOUR FINAL ANSWER should be a number OR as few words as possible OR a comma separated list of numbers and/or strings. If you are asked for a number, don't use comma to write your number neither use units such as $ or percent sign unless specified otherwise. If you are asked for a string, don't use articles, neither abbreviations (e.g. cities), and write the digits in plain text unless specified otherwise. If you are asked for a comma separated list, apply the above rules depending of whether the element to be put in the list is a number or a string.'''
|
| 119 |
)
|
| 120 |
return manager_agent
|
| 121 |
else:
|
| 122 |
-
return None
|
|
|
|
| 17 |
|
| 18 |
# 1. Load the model
|
| 19 |
# Make sure to set HF_TOKEN in your Hugging Face Space secrets
|
| 20 |
+
model_name = "mistralai/Mixtral-8x7B-Instruct-v0.1"
|
| 21 |
try:
|
| 22 |
model = InferenceClientModel(model_id=model_name, token=os.environ.get("HF_TOKEN"), provider="together")
|
| 23 |
except Exception as e:
|
|
|
|
| 115 |
model=model,
|
| 116 |
managed_agents=[web_agent],
|
| 117 |
additional_authorized_imports=["time", "numpy", "pandas"],
|
| 118 |
+
instructions='''You are a general AI assistant. I will ask you a question. Report your thoughts, and finish your answer with the a new line and the following template: FINAL ANSWER: [YOUR FINAL ANSWER]. YOUR FINAL ANSWER should be a number OR as few words as possible OR a comma separated list of numbers and/or strings. If you are asked for a number, don't use comma to write your number neither use units such as $ or percent sign unless specified otherwise. If you are asked for a string, don't use articles, neither abbreviations (e.g. for cities), and write the digits in plain text unless specified otherwise. If you are asked for a comma separated list, apply the above rules depending of whether the element to be put in the list is a number or a string.'''
|
| 119 |
)
|
| 120 |
return manager_agent
|
| 121 |
else:
|
| 122 |
+
return None
|