garvitcpp commited on
Commit
df163bd
·
verified ·
1 Parent(s): 776edea

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -128,9 +128,10 @@ def main():
128
 
129
  def health_check():
130
  """Simple health check endpoint that returns JSON"""
131
- if 'health' in st.experimental_get_query_params():
132
- st.json({"status": "OK"})
133
- st.stop()
 
134
  return True
135
  return False
136
 
 
128
 
129
  def health_check():
130
  """Simple health check endpoint that returns JSON"""
131
+ params = st.experimental_get_query_params()
132
+ if 'health' in params and params['health'][0] == 'true':
133
+ st.write('{"status": "OK"}')
134
+ st.cache_data.clear() # Clear cache to ensure fresh state
135
  return True
136
  return False
137