Spaces:
Running
Running
Update pages/Entorno de Ejecución.py
Browse files
pages/Entorno de Ejecución.py
CHANGED
@@ -12,6 +12,9 @@ st.set_page_config(
|
|
12 |
}
|
13 |
)
|
14 |
|
|
|
|
|
|
|
15 |
st.title("Entorno de ejecución")
|
16 |
cnn, autoencoder, svm, iforest, gan, docc = st.tabs(["CNN", "Autoencoder", "OC-SVM", 'iForest', 'GAN', 'DOCC'])
|
17 |
|
@@ -20,7 +23,7 @@ with cnn:
|
|
20 |
col_a, col_b, = st.columns(2)
|
21 |
|
22 |
with col_a:
|
23 |
-
st.title("Redes neuronales convolucionales
|
24 |
st.caption("Los modelos no están en orden de eficacia, sino en orden de creación.")
|
25 |
|
26 |
# Get the absolute path to the current directory
|
@@ -53,14 +56,6 @@ with cnn:
|
|
53 |
model_choice = st.multiselect("Seleccione uno o varios modelos de clasificación", model_dict.keys())
|
54 |
|
55 |
selected_models = []
|
56 |
-
|
57 |
-
def ensemble_model(model_list, img):
|
58 |
-
y_gorrito = np.zeros((1, 1))
|
59 |
-
for model in model_list:
|
60 |
-
instance_model = load_model(model_dict[model])
|
61 |
-
y_gorrito += float(instance_model.predict(np.expand_dims(img/255., 0)))
|
62 |
-
#clear_session()
|
63 |
-
return y_gorrito/len(model_list)
|
64 |
|
65 |
@tf.function
|
66 |
def predict(model_list, img):
|
@@ -93,7 +88,7 @@ with cnn:
|
|
93 |
y_gorrito = predict(ultraptctrn, img)
|
94 |
else:
|
95 |
with st.spinner('Cargando predicción...'):
|
96 |
-
selected_models = [load_model(model_dict[model]) for model in model_choice]
|
97 |
y_gorrito = predict(selected_models, img)
|
98 |
|
99 |
if y_gorrito >= threshold:
|
|
|
12 |
}
|
13 |
)
|
14 |
|
15 |
+
with st.sidebar:
|
16 |
+
st.write("[email protected]")
|
17 |
+
|
18 |
st.title("Entorno de ejecución")
|
19 |
cnn, autoencoder, svm, iforest, gan, docc = st.tabs(["CNN", "Autoencoder", "OC-SVM", 'iForest', 'GAN', 'DOCC'])
|
20 |
|
|
|
23 |
col_a, col_b, = st.columns(2)
|
24 |
|
25 |
with col_a:
|
26 |
+
st.title("Redes neuronales convolucionales")
|
27 |
st.caption("Los modelos no están en orden de eficacia, sino en orden de creación.")
|
28 |
|
29 |
# Get the absolute path to the current directory
|
|
|
56 |
model_choice = st.multiselect("Seleccione uno o varios modelos de clasificación", model_dict.keys())
|
57 |
|
58 |
selected_models = []
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
59 |
|
60 |
@tf.function
|
61 |
def predict(model_list, img):
|
|
|
88 |
y_gorrito = predict(ultraptctrn, img)
|
89 |
else:
|
90 |
with st.spinner('Cargando predicción...'):
|
91 |
+
selected_models = [load_model(model_dict[model]) for model in model_choice if model not in selected_models]
|
92 |
y_gorrito = predict(selected_models, img)
|
93 |
|
94 |
if y_gorrito >= threshold:
|