Spaces:
Running
Running
Update pages/Entorno de Ejecución.py
Browse files
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 |
-
|
28 |
-
|
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 |
-
|
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)
|