From e60071151c23954ffc2bacd165189649916b652d Mon Sep 17 00:00:00 2001 From: hh_itx_win10 Date: Tue, 2 Apr 2024 12:58:14 -0700 Subject: [PATCH] hotfix: remove uncessary page... --- code/pages/3_PyGWalker.py | 29 ----------------------------- 1 file changed, 29 deletions(-) delete mode 100644 code/pages/3_PyGWalker.py diff --git a/code/pages/3_PyGWalker.py b/code/pages/3_PyGWalker.py deleted file mode 100644 index 8f4de46..0000000 --- a/code/pages/3_PyGWalker.py +++ /dev/null @@ -1,29 +0,0 @@ -import pandas as pd -import streamlit.components.v1 as components -import streamlit as st -from pygwalker.api.streamlit import init_streamlit_comm, get_streamlit_html - -st.set_page_config( - page_title="Use Pygwalker In Streamlit", - layout="wide" -) - -st.title("Use Pygwalker In Streamlit(support communication)") - -# Initialize pygwalker communication -init_streamlit_comm() - -# When using `use_kernel_calc=True`, you should cache your pygwalker html, if you don't want your memory to explode -@st.cache_resource -def get_pyg_html(df: pd.DataFrame) -> str: - # When you need to publish your application, you need set `debug=False`,prevent other users to write your config file. - html = get_streamlit_html(df, spec="./gw0.json", use_kernel_calc=False, debug=False) - return html - -@st.cache_data -def get_df() -> pd.DataFrame: - return pd.read_csv("https://kanaries-app.s3.ap-northeast-1.amazonaws.com/public-datasets/bike_sharing_dc.csv") - -df = get_df() - -components.html(get_pyg_html(df), width=1300, height=1000, scrolling=True) \ No newline at end of file