Shreyas094 commited on
Commit
63bd648
1 Parent(s): 05627b5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
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
- "meta-llama/Meta-Llama-3.1-8B-Instruct",
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
- {"role": "system", "content": "You are a highly specialized data analyst with expertise in analyzing and summarizing Excel spreadsheets. Your goal is to provide accurate, detailed, and precise information on the data provided. Focus on identifying key metrics, trends, and significant details relevant to the query. Avoid making assumptions or adding information that is not explicitly supported by the data."},
360
- {"role": "user", "content": f"Using the following data extracted from Excel spreadsheets:\n{context}\n\nPlease analyze this data and provide a comprehensive answer to the following question: '{query}'. If appropriate, suggest visualizations that could help illustrate the findings."}
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/"):