Skip to content

Commit 6312b3e

Browse files
committed
fix: conflict 수정결과에서 에러 수정
1 parent d1746f2 commit 6312b3e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

interface/lang2sql.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)