Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -61,8 +61,12 @@ def main():
|
|
| 61 |
custom_prefix = """
|
| 62 |
You are working with a pandas dataframe in Python. The name of the dataframe is `df`.
|
| 63 |
You should use the tools below to answer the question posed of you.
|
| 64 |
-
|
| 65 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 66 |
"""
|
| 67 |
|
| 68 |
agent = create_pandas_dataframe_agent(
|
|
|
|
| 61 |
custom_prefix = """
|
| 62 |
You are working with a pandas dataframe in Python. The name of the dataframe is `df`.
|
| 63 |
You should use the tools below to answer the question posed of you.
|
| 64 |
+
|
| 65 |
+
IMPORTANT RULES:
|
| 66 |
+
1. Your 'Action Input' must be valid Python code and ONLY Python code.
|
| 67 |
+
2. Do not wrap the code in markdown code blocks within the Action Input.
|
| 68 |
+
3. Before creating a visualization for filtered data, always check if the filtered dataframe is empty.
|
| 69 |
+
4. For plots, use `plt.figure()` and end with `st.pyplot(plt.gcf())` if you are using matplotlib/seaborn.
|
| 70 |
"""
|
| 71 |
|
| 72 |
agent = create_pandas_dataframe_agent(
|