Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -89,17 +89,17 @@ def main():
|
|
| 89 |
# FIX: Ensure include_df_in_prompt is False when using a custom suffix
|
| 90 |
# This prevents the ValueError: "If suffix is specified, include_df_in_prompt should not be."
|
| 91 |
agent = create_pandas_dataframe_agent(
|
| 92 |
-
|
| 93 |
-
|
| 94 |
-
|
| 95 |
-
|
| 96 |
-
|
| 97 |
-
|
| 98 |
-
|
| 99 |
-
|
| 100 |
-
|
| 101 |
-
|
| 102 |
-
|
| 103 |
}
|
| 104 |
)
|
| 105 |
|
|
|
|
| 89 |
# FIX: Ensure include_df_in_prompt is False when using a custom suffix
|
| 90 |
# This prevents the ValueError: "If suffix is specified, include_df_in_prompt should not be."
|
| 91 |
agent = create_pandas_dataframe_agent(
|
| 92 |
+
llm,
|
| 93 |
+
df,
|
| 94 |
+
verbose=True,
|
| 95 |
+
agent_type="zero-shot-react", # <-- FIXED
|
| 96 |
+
allow_dangerous_code=True,
|
| 97 |
+
prefix=custom_prefix,
|
| 98 |
+
suffix=custom_suffix,
|
| 99 |
+
include_df_in_prompt=False, # <-- now allowed
|
| 100 |
+
handle_parsing_errors=True,
|
| 101 |
+
agent_executor_kwargs={
|
| 102 |
+
"handle_parsing_errors": True
|
| 103 |
}
|
| 104 |
)
|
| 105 |
|