frncscp commited on
Commit
b6152a3
1 Parent(s): 2f782b9

Update pages/Entorno de Ejecución.py

Browse files
Files changed (1) hide show
  1. pages/Entorno de Ejecución.py +4 -8
pages/Entorno de Ejecución.py CHANGED
@@ -24,19 +24,15 @@ with cnn:
24
  st.title("Redes neuronales convolucionales")
25
  st.caption("Los modelos no están en orden de eficacia, sino en orden de creación.")
26
 
27
- # Get the absolute path to the current directory
28
- #current_dir = os.path.abspath(os.path.dirname(__file__))
29
-
30
- # Get the absolute path to the parent directory of the current directory
31
- #root_dir = os.path.abspath(os.path.join(current_dir, os.pardir))
32
 
33
  # Join the path to the models folder
34
- #DIR = os.path.join(root_dir, "models")
35
- DIR = ('Patacotron/models')
36
  models = os.listdir(DIR)
37
 
38
  model_dict = dict()
39
- for model in models:
40
  model_name = model.split(DIR)
41
  model_name = str(model.split('.h5')[0])
42
  model_dir = os.path.join(DIR, model)
 
24
  st.title("Redes neuronales convolucionales")
25
  st.caption("Los modelos no están en orden de eficacia, sino en orden de creación.")
26
 
27
+ current_dir = os.getcwd()
28
+ root_dir = os.path.dirname(current_dir)
 
 
 
29
 
30
  # Join the path to the models folder
31
+ DIR = os.path.join(root_dir, "models")
 
32
  models = os.listdir(DIR)
33
 
34
  model_dict = dict()
35
+ for model in models: #preprocessing of strings so the name is readable in the multiselect bar
36
  model_name = model.split(DIR)
37
  model_name = str(model.split('.h5')[0])
38
  model_dir = os.path.join(DIR, model)