frncscp commited on
Commit
7a795c8
·
1 Parent(s): 1e3f8f8

Update pages/Entorno de Ejecución.py

Browse files
Files changed (1) hide show
  1. pages/Entorno de Ejecución.py +3 -2
pages/Entorno de Ejecución.py CHANGED
@@ -32,11 +32,12 @@ with cnn:
32
  # Join the path to the models folder
33
  DIR = os.path.join(current_dir, "models")
34
  models = os.listdir(DIR)
 
 
35
 
36
  model_dict = dict()
37
  for model in models: #preprocessing of strings so the name is readable in the multiselect bar
38
- model_name = model.split(DIR)
39
- model_name = str(model.split('.h5')[0])
40
  model_dir = os.path.join(DIR, model)
41
  model_dict[model_name] = model_dir
42
 
 
32
  # Join the path to the models folder
33
  DIR = os.path.join(current_dir, "models")
34
  models = os.listdir(DIR)
35
+ common_root = r"D:\ptctrn\models\ptctrn_v"
36
+ common_end = ".h5"
37
 
38
  model_dict = dict()
39
  for model in models: #preprocessing of strings so the name is readable in the multiselect bar
40
+ model_name = 'Patacotrón ' + modelo.split(common_root)[-1].split(common_end)[0]
 
41
  model_dir = os.path.join(DIR, model)
42
  model_dict[model_name] = model_dir
43