phyloforfun commited on
Commit
88f7b69
1 Parent(s): c47fa5d
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -306,7 +306,7 @@ def delete_directory(dir_path):
306
  shutil.rmtree(dir_path)
307
  st.session_state['input_list'] = []
308
  st.session_state['input_list_small'] = []
309
- st.success(f"Deleted previously uploaded images, making room for new images: {dir_path}")
310
  except OSError as e:
311
  st.error(f"Error: {dir_path} : {e.strerror}")
312
 
@@ -1348,8 +1348,8 @@ def clear_image_gallery():
1348
  validate_dir(st.session_state['dir_uploaded_images_small'])
1349
 
1350
  def use_test_image():
1351
- st.session_state.config['leafmachine']['project']['dir_images_local'] = os.path.join(st.session_state.dir_home,'demo','demo_images')
1352
  st.info(f"Processing images from {os.path.join(st.session_state.dir_home,'demo','demo_images')}")
 
1353
  n_images = len([f for f in os.listdir(st.session_state.config['leafmachine']['project']['dir_images_local']) if os.path.isfile(os.path.join(st.session_state.config['leafmachine']['project']['dir_images_local'], f))])
1354
  st.session_state['processing_add_on'] = f" {n_images} Images"
1355
 
@@ -1439,6 +1439,8 @@ def content_tab_settings():
1439
  n_images = len([f for f in os.listdir(st.session_state.config['leafmachine']['project']['dir_images_local']) if os.path.isfile(os.path.join(st.session_state.config['leafmachine']['project']['dir_images_local'], f))])
1440
  st.session_state['processing_add_on'] = f" {n_images} Images"
1441
  uploaded_files = None
 
 
1442
  st.button("Use Test Image",help="This will clear any uploaded images and load the 1 provided test image.",on_click=use_test_image)
1443
 
1444
  with col_local_2:
 
306
  shutil.rmtree(dir_path)
307
  st.session_state['input_list'] = []
308
  st.session_state['input_list_small'] = []
309
+ # st.success(f"Deleted previously uploaded images, making room for new images: {dir_path}")
310
  except OSError as e:
311
  st.error(f"Error: {dir_path} : {e.strerror}")
312
 
 
1348
  validate_dir(st.session_state['dir_uploaded_images_small'])
1349
 
1350
  def use_test_image():
 
1351
  st.info(f"Processing images from {os.path.join(st.session_state.dir_home,'demo','demo_images')}")
1352
+ st.session_state.config['leafmachine']['project']['dir_images_local'] = os.path.join(st.session_state.dir_home,'demo','demo_images')
1353
  n_images = len([f for f in os.listdir(st.session_state.config['leafmachine']['project']['dir_images_local']) if os.path.isfile(os.path.join(st.session_state.config['leafmachine']['project']['dir_images_local'], f))])
1354
  st.session_state['processing_add_on'] = f" {n_images} Images"
1355
 
 
1439
  n_images = len([f for f in os.listdir(st.session_state.config['leafmachine']['project']['dir_images_local']) if os.path.isfile(os.path.join(st.session_state.config['leafmachine']['project']['dir_images_local'], f))])
1440
  st.session_state['processing_add_on'] = f" {n_images} Images"
1441
  uploaded_files = None
1442
+ st.info(f"Processing ***{n_images}*** images from {st.session_state.config['leafmachine']['project']['dir_images_local']}")
1443
+
1444
  st.button("Use Test Image",help="This will clear any uploaded images and load the 1 provided test image.",on_click=use_test_image)
1445
 
1446
  with col_local_2: