File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -179,17 +179,17 @@ def should_show(_key: str) -> bool:
179179 st .dataframe (df .head (10 ) if len (df ) > 10 else df )
180180 except Exception as e :
181181 st .error (f"쿼리 실행 중 오류 발생: { e } " )
182- if should_show ("show_chart" ) and df is not None :
182+ if should_show ("show_chart" ):
183+ df = database .run_sql (sql )
183184 st .markdown ("**쿼리 결과 시각화:**" )
184185 display_code = DisplayChart (
185186 question = res ["refined_input" ].content ,
186187 sql = sql ,
187- df_metadata = f"Running df.dtypes gives:\n { df .dtypes } "
188+ df_metadata = f"Running df.dtypes gives:\n { df .dtypes } " ,
188189 )
189190 # plotly_code 변수도 따로 보관할 필요 없이 바로 그려도 됩니다
190191 fig = display_code .get_plotly_figure (
191- plotly_code = display_code .generate_plotly_code (),
192- df = df
192+ plotly_code = display_code .generate_plotly_code (), df = df
193193 )
194194 st .plotly_chart (fig )
195195
You can’t perform that action at this time.
0 commit comments