4rtemi5 commited on
Commit
a273663
1 Parent(s): e8aa0cd

lower load manager threshold

Browse files
Files changed (1) hide show
  1. localization.py +2 -2
localization.py CHANGED
@@ -143,14 +143,14 @@ def app():
143
  with st.spinner('Waiting for resources...'):
144
  sleep_time = 5
145
  print('CPU_load', psutil.cpu_percent())
146
- while psutil.cpu_percent() > 90:
147
  time.sleep(sleep_time)
148
 
149
 
150
  if not caption or not image_url:
151
  st.error("Please choose one image and at least one label")
152
  else:
153
- with st.spinner("Computing..."):
154
  heatmap, image = get_heatmap(image_url, caption, pixel_size, iterations)
155
 
156
  with col1:
 
143
  with st.spinner('Waiting for resources...'):
144
  sleep_time = 5
145
  print('CPU_load', psutil.cpu_percent())
146
+ while psutil.cpu_percent() > 60:
147
  time.sleep(sleep_time)
148
 
149
 
150
  if not caption or not image_url:
151
  st.error("Please choose one image and at least one label")
152
  else:
153
+ with st.spinner("Computing... This might take up to a few minutes depending on the current load :/"):
154
  heatmap, image = get_heatmap(image_url, caption, pixel_size, iterations)
155
 
156
  with col1: