Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -39,7 +39,7 @@ MODELS = [
|
|
39 |
"mistralai/Mixtral-8x7B-Instruct-v0.1",
|
40 |
"@cf/meta/llama-3.1-8b-instruct",
|
41 |
"mistralai/Mistral-Nemo-Instruct-2407",
|
42 |
-
"
|
43 |
"duckduckgo/gpt-4o-mini",
|
44 |
"duckduckgo/claude-3-haiku",
|
45 |
"duckduckgo/llama-3.1-70b",
|
@@ -356,8 +356,8 @@ def get_response_from_excel(query, model, context, num_calls=3, temperature=0.2)
|
|
356 |
logging.info(f"Getting response from Excel using model: {model}")
|
357 |
|
358 |
messages = [
|
359 |
-
|
360 |
-
|
361 |
]
|
362 |
|
363 |
if model.startswith("duckduckgo/"):
|
|
|
39 |
"mistralai/Mixtral-8x7B-Instruct-v0.1",
|
40 |
"@cf/meta/llama-3.1-8b-instruct",
|
41 |
"mistralai/Mistral-Nemo-Instruct-2407",
|
42 |
+
"mistralai/Mathstral-7B-v0.1",
|
43 |
"duckduckgo/gpt-4o-mini",
|
44 |
"duckduckgo/claude-3-haiku",
|
45 |
"duckduckgo/llama-3.1-70b",
|
|
|
356 |
logging.info(f"Getting response from Excel using model: {model}")
|
357 |
|
358 |
messages = [
|
359 |
+
{"role": "system", "content": "You are a highly specialized data analyst with deep expertise in analyzing and summarizing Excel spreadsheets. Your primary goal is to perform calculations with the utmost accuracy, strictly using the numbers and data provided. Focus exclusively on the dataset to identify key metrics, trends, and significant details relevant to the user's query. Do not make assumptions or add any information that is not explicitly supported by the dataset."},
|
360 |
+
{"role": "user", "content": f"Based on the following data extracted from Excel spreadsheets:\n{context}\n\nPlease analyze this data and provide a precise and comprehensive answer to the following question: '{query}'. Ensure that all calculations and conclusions are derived directly from the dataset. If suitable, suggest visualizations that could accurately illustrate the findings."}
|
361 |
]
|
362 |
|
363 |
if model.startswith("duckduckgo/"):
|