Aziz Alto commited on
Commit
53f4c47
·
1 Parent(s): dcda531

Use older st.caching decorators

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -16,7 +16,7 @@ st.title("PySQLify")
16
  st.write("_Data Analysis_ Tool")
17
 
18
 
19
- @st.cache_data
20
  def _read_csv(f, **kwargs):
21
  df = pd.read_csv(f, on_bad_lines="skip", **kwargs)
22
  # clean
@@ -123,7 +123,7 @@ def code_editor(language, hint, show_panel, key=None):
123
  return content
124
 
125
 
126
- @st.cache_data
127
  def query_data(sql, df):
128
  try:
129
  return duckdb.query(sql).df()
@@ -173,7 +173,7 @@ def run_python_script(user_script, key):
173
  st.exception(e)
174
 
175
 
176
- @st.cache_resource
177
  def data_profiler(df):
178
  return ProfileReport(df, title="Profiling Report")
179
 
 
16
  st.write("_Data Analysis_ Tool")
17
 
18
 
19
+ @st.experimental_memo
20
  def _read_csv(f, **kwargs):
21
  df = pd.read_csv(f, on_bad_lines="skip", **kwargs)
22
  # clean
 
123
  return content
124
 
125
 
126
+ @st.experimental_memo
127
  def query_data(sql, df):
128
  try:
129
  return duckdb.query(sql).df()
 
173
  st.exception(e)
174
 
175
 
176
+ @st.experimental_singleton
177
  def data_profiler(df):
178
  return ProfileReport(df, title="Profiling Report")
179