Spaces:
Running
Running
Update core_agent.py
Browse files- core_agent.py +6 -6
core_agent.py
CHANGED
|
@@ -28,15 +28,15 @@ warnings.filterwarnings("ignore")
|
|
| 28 |
load_dotenv()
|
| 29 |
|
| 30 |
# βββ Palette βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 31 |
-
PALETTE = ["#
|
| 32 |
-
DARK_BG = "#
|
| 33 |
-
CARD_BG = "#
|
| 34 |
|
| 35 |
|
| 36 |
# βββ LLM Setup βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 37 |
def get_llm(api_key: str):
|
| 38 |
return ChatGoogleGenerativeAI(
|
| 39 |
-
model="gemini-
|
| 40 |
google_api_key=api_key,
|
| 41 |
temperature=0.3,
|
| 42 |
convert_system_message_to_human=True,
|
|
@@ -169,7 +169,7 @@ def make_plotly_chart(chart_type: str, df: pd.DataFrame, profile: dict,
|
|
| 169 |
num_cols = profile["numeric_columns"]
|
| 170 |
cat_cols = profile["categorical_columns"]
|
| 171 |
|
| 172 |
-
template = "
|
| 173 |
|
| 174 |
if chart_type == "correlation_heatmap" and len(num_cols) >= 2:
|
| 175 |
corr = df[num_cols].corr().round(2)
|
|
@@ -276,7 +276,7 @@ def make_plotly_chart(chart_type: str, df: pd.DataFrame, profile: dict,
|
|
| 276 |
fig.update_layout(
|
| 277 |
paper_bgcolor=DARK_BG,
|
| 278 |
plot_bgcolor=CARD_BG,
|
| 279 |
-
font=dict(family="DM Sans, sans-serif", color="#
|
| 280 |
margin=dict(l=40, r=40, t=60, b=40),
|
| 281 |
)
|
| 282 |
return fig
|
|
|
|
| 28 |
load_dotenv()
|
| 29 |
|
| 30 |
# βββ Palette βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 31 |
+
PALETTE = ["#4F8EF7", "#27C98F", "#F7654F", "#F7B84F", "#A78BFA", "#34D399"]
|
| 32 |
+
DARK_BG = "#F7F8FC"
|
| 33 |
+
CARD_BG = "#FFFFFF"
|
| 34 |
|
| 35 |
|
| 36 |
# βββ LLM Setup βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 37 |
def get_llm(api_key: str):
|
| 38 |
return ChatGoogleGenerativeAI(
|
| 39 |
+
model="gemini-1.5-flash",
|
| 40 |
google_api_key=api_key,
|
| 41 |
temperature=0.3,
|
| 42 |
convert_system_message_to_human=True,
|
|
|
|
| 169 |
num_cols = profile["numeric_columns"]
|
| 170 |
cat_cols = profile["categorical_columns"]
|
| 171 |
|
| 172 |
+
template = "plotly_white"
|
| 173 |
|
| 174 |
if chart_type == "correlation_heatmap" and len(num_cols) >= 2:
|
| 175 |
corr = df[num_cols].corr().round(2)
|
|
|
|
| 276 |
fig.update_layout(
|
| 277 |
paper_bgcolor=DARK_BG,
|
| 278 |
plot_bgcolor=CARD_BG,
|
| 279 |
+
font=dict(family="DM Sans, sans-serif", color="#1A202C"),
|
| 280 |
margin=dict(l=40, r=40, t=60, b=40),
|
| 281 |
)
|
| 282 |
return fig
|