Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -194,12 +194,12 @@ def analyze_data(csv_file, additional_notes=""):
|
|
| 194 |
raw_output = agent.run("""
|
| 195 |
You are a data analysis agent. Output in JSON only. Follow these instructions EXACTLY without any deviation:
|
| 196 |
1. Load the data from the given `source_file` ONLY. DO NOT create your OWN DATA.
|
| 197 |
-
2. Analyze the data
|
| 198 |
3. Save all figures to `./figures` as PNG using matplotlib or seaborn.
|
| 199 |
4. Use only authorized imports: `pandas`, `numpy`, `matplotlib.pyplot`, `seaborn`, `json`.
|
| 200 |
5. DO NOT return any explanations, thoughts, or narration outside the final JSON block
|
| 201 |
6. Run only 5 steps and return output in less than a minute.
|
| 202 |
-
7.
|
| 203 |
8. ONLY output a single, valid JSON block. No markdown or extra text.
|
| 204 |
9. Output ONLY the following JSON code block format, exactly:
|
| 205 |
{
|
|
@@ -592,7 +592,7 @@ with gr.Blocks() as demo:
|
|
| 592 |
with gr.Column():
|
| 593 |
insights_output = gr.HTML(label="Insights from SmolAgent")
|
| 594 |
visual_output = gr.Gallery(label="Visualizations (Auto-generated by Agent)", columns=2)
|
| 595 |
-
agent_btn = gr.Button("Run AI Agent (
|
| 596 |
|
| 597 |
with gr.Row():
|
| 598 |
train_btn = gr.Button("Train Model with Optuna + WandB")
|
|
|
|
| 194 |
raw_output = agent.run("""
|
| 195 |
You are a data analysis agent. Output in JSON only. Follow these instructions EXACTLY without any deviation:
|
| 196 |
1. Load the data from the given `source_file` ONLY. DO NOT create your OWN DATA.
|
| 197 |
+
2. Analyze the data and generate up to 3 visualizations and 3 insights.
|
| 198 |
3. Save all figures to `./figures` as PNG using matplotlib or seaborn.
|
| 199 |
4. Use only authorized imports: `pandas`, `numpy`, `matplotlib.pyplot`, `seaborn`, `json`.
|
| 200 |
5. DO NOT return any explanations, thoughts, or narration outside the final JSON block
|
| 201 |
6. Run only 5 steps and return output in less than a minute.
|
| 202 |
+
7. ONLY include natural language as observation value or insight value.
|
| 203 |
8. ONLY output a single, valid JSON block. No markdown or extra text.
|
| 204 |
9. Output ONLY the following JSON code block format, exactly:
|
| 205 |
{
|
|
|
|
| 592 |
with gr.Column():
|
| 593 |
insights_output = gr.HTML(label="Insights from SmolAgent")
|
| 594 |
visual_output = gr.Gallery(label="Visualizations (Auto-generated by Agent)", columns=2)
|
| 595 |
+
agent_btn = gr.Button("Run AI Agent (3 Insights + 3 Visualizations)")
|
| 596 |
|
| 597 |
with gr.Row():
|
| 598 |
train_btn = gr.Button("Train Model with Optuna + WandB")
|