Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -26,14 +26,14 @@ if "Mistral" not in os.environ:
|
|
| 26 |
os.environ["Mistral"] = getpass.getpass("Enter your Mistral API key: ")
|
| 27 |
|
| 28 |
print("Loading LLM...")
|
| 29 |
-
|
| 30 |
model="pixtral-large-2411",
|
| 31 |
temperature=0.01,
|
| 32 |
max_retries=6,
|
| 33 |
mistral_api_key = os.getenv("Mistral")
|
| 34 |
)
|
| 35 |
print(f"Model {chat1.model} downloaded!")
|
| 36 |
-
|
| 37 |
model="mistral-medium-2505",
|
| 38 |
temperature=0.01,
|
| 39 |
max_retries=6,
|
|
@@ -189,7 +189,7 @@ class BasicAgent:
|
|
| 189 |
YOUR FINAL ANSWER should be a number OR as few words as possible OR a comma separated list of numbers and/or strings. \
|
| 190 |
If you are asked for a number, use only digits in your final answer. Don't use comma nor brackets to write your number neither use units such as $ or percent sign unless specified otherwise. \
|
| 191 |
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. \
|
| 192 |
-
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.\
|
| 193 |
If there is a file attached, open the file and read it. \
|
| 194 |
If you don't have enough references to answer, use your tools, search the web, run your code or convert data to a data frame, whatever helps. \
|
| 195 |
If the question refers to an external content and there is no reference file attached, perform a web search and retrieve relevant information from the internet. \
|
|
@@ -214,7 +214,7 @@ class BasicAgent:
|
|
| 214 |
answer = answer.replace('*', '')
|
| 215 |
print(f"Agent returning fixed answer: {answer}")
|
| 216 |
|
| 217 |
-
|
| 218 |
|
| 219 |
|
| 220 |
def run_and_submit_all(profile: gr.OAuthProfile | None):
|
|
|
|
| 26 |
os.environ["Mistral"] = getpass.getpass("Enter your Mistral API key: ")
|
| 27 |
|
| 28 |
print("Loading LLM...")
|
| 29 |
+
chat2 = ChatMistralAI(
|
| 30 |
model="pixtral-large-2411",
|
| 31 |
temperature=0.01,
|
| 32 |
max_retries=6,
|
| 33 |
mistral_api_key = os.getenv("Mistral")
|
| 34 |
)
|
| 35 |
print(f"Model {chat1.model} downloaded!")
|
| 36 |
+
chat1 = ChatMistralAI(
|
| 37 |
model="mistral-medium-2505",
|
| 38 |
temperature=0.01,
|
| 39 |
max_retries=6,
|
|
|
|
| 189 |
YOUR FINAL ANSWER should be a number OR as few words as possible OR a comma separated list of numbers and/or strings. \
|
| 190 |
If you are asked for a number, use only digits in your final answer. Don't use comma nor brackets to write your number neither use units such as $ or percent sign unless specified otherwise. \
|
| 191 |
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. \
|
| 192 |
+
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. Wrap the list with [square brackets].\
|
| 193 |
If there is a file attached, open the file and read it. \
|
| 194 |
If you don't have enough references to answer, use your tools, search the web, run your code or convert data to a data frame, whatever helps. \
|
| 195 |
If the question refers to an external content and there is no reference file attached, perform a web search and retrieve relevant information from the internet. \
|
|
|
|
| 214 |
answer = answer.replace('*', '')
|
| 215 |
print(f"Agent returning fixed answer: {answer}")
|
| 216 |
|
| 217 |
+
return answer
|
| 218 |
|
| 219 |
|
| 220 |
def run_and_submit_all(profile: gr.OAuthProfile | None):
|