pavanmutha commited on
Commit
06536ec
·
verified ·
1 Parent(s): 62a7ba8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -8
app.py CHANGED
@@ -136,14 +136,16 @@ def analyze_data(csv_file, additional_notes=""):
136
 
137
  agent = CodeAgent(tools=[], model=model, additional_authorized_imports=["numpy", "pandas", "matplotlib.pyplot", "seaborn", "sklearn", "json"])
138
  analysis_result = agent.run("""
139
- You are a helpful data analysis agent. Just return insight information and visualization.
140
- Load the data that is passed.do not create your own.
141
- Automatically detect numeric columns and names.
142
- 2. 5 data visualizations
143
- 3. at least 5 insights from data
144
- 5. Generate publication-quality visualizations and save to './figures/'.
145
- Do not use 'open()' or write to files. Just return variables and plots.
146
- The dictionary should have the following structure:
 
 
147
  {
148
  'observations': {
149
  'observation_1_key': 'observation_1_value',
 
136
 
137
  agent = CodeAgent(tools=[], model=model, additional_authorized_imports=["numpy", "pandas", "matplotlib.pyplot", "seaborn", "sklearn", "json"])
138
  analysis_result = agent.run("""
139
+ You are a helpful data analysis agent. Follow these instructions EXACTLY:
140
+
141
+ 1. Load the data from the given `source_file` ONLY.
142
+ 2. Analyze the data structure and generate up to 5 visualizations and 5 insights.
143
+ 3. Save all figures to `./figures` as PNG using matplotlib or seaborn.
144
+ 4. Use only authorized imports: `pandas`, `numpy`, `matplotlib.pyplot`, `seaborn`, `json`.
145
+ 5. DO NOT return any explanations, thoughts, or narration outside the final output block.
146
+ 6. Run only 5 iteration and return output quickly.
147
+
148
+ ⚠️ Output ONLY the following code block format, exactly:
149
  {
150
  'observations': {
151
  'observation_1_key': 'observation_1_value',