Spaces:
Running
Running
Update pages/Entorno de Ejecución.py
Browse files
pages/Entorno de Ejecución.py
CHANGED
@@ -18,7 +18,7 @@ st.set_page_config(
|
|
18 |
)
|
19 |
|
20 |
st.sidebar.write("contact@patacotron.tech")
|
21 |
-
|
22 |
cnn, vit, zero_shot, autoencoder, svm, iforest, gan = st.tabs(["CNN", "ViT", "Zero-Shot", "Autoencoder", "OC-SVM", 'iForest', 'GAN'])
|
23 |
|
24 |
def predict(_model_list, _weights, _img):
|
@@ -85,6 +85,7 @@ with cnn:
|
|
85 |
model_dir = os.path.join(DIR, model)
|
86 |
model_name = 'Patacotrón ' + model_dir.split(common_root)[-1].split(common_end)[0]
|
87 |
model_dict[model_name] = model_dir
|
|
|
88 |
#ultraversions = ['Patacotrón 1.5', 'Patacotrón 1.7', 'Patacotrón 1.8', 'Patacotrón 1.12', 'Patacotrón 1.12.2', 'Patacotrón 1.12.3']
|
89 |
#ultraversions = ['Patacotrón 1.5', 'Patacotrón 1.6', 'Patacotrón 1.12.2', 'Patacotrón 1.8', 'Patacotrón 1.12']#, 'Patacotrón 1.13.20', 'Patacotrón 1.13.38']
|
90 |
#['Patacotrón 1.5', 'Patacotrón 1.6', 'Patacotrón 1.7', 'Patacotrón 1.12'] #
|
@@ -104,6 +105,8 @@ with cnn:
|
|
104 |
|
105 |
threshold = st.slider('¿Cuál va a ser el límite donde se considere patacón? (el valor recomendado es de 75%-80%)', 0, 100, 50, key = 'threshold_convnet')
|
106 |
|
|
|
|
|
107 |
selected_models = []
|
108 |
|
109 |
# Set the image dimensions
|
@@ -114,6 +117,8 @@ with cnn:
|
|
114 |
with col_b:
|
115 |
|
116 |
uploaded_file = st.file_uploader(key = 'conv_upload', label = 'Sube la imagen a clasificar',type= ['jpg','png', 'jpeg', 'jfif', 'webp', 'heic'])
|
|
|
|
|
117 |
|
118 |
if st.button(key = 'convnet_button', label ='¿Hay un patacón en la imagen?'):
|
119 |
if len(model_choice) < 1:
|
|
|
18 |
)
|
19 |
|
20 |
st.sidebar.write("contact@patacotron.tech")
|
21 |
+
already_excuted = False
|
22 |
cnn, vit, zero_shot, autoencoder, svm, iforest, gan = st.tabs(["CNN", "ViT", "Zero-Shot", "Autoencoder", "OC-SVM", 'iForest', 'GAN'])
|
23 |
|
24 |
def predict(_model_list, _weights, _img):
|
|
|
85 |
model_dir = os.path.join(DIR, model)
|
86 |
model_name = 'Patacotrón ' + model_dir.split(common_root)[-1].split(common_end)[0]
|
87 |
model_dict[model_name] = model_dir
|
88 |
+
st.write(model_dict)
|
89 |
#ultraversions = ['Patacotrón 1.5', 'Patacotrón 1.7', 'Patacotrón 1.8', 'Patacotrón 1.12', 'Patacotrón 1.12.2', 'Patacotrón 1.12.3']
|
90 |
#ultraversions = ['Patacotrón 1.5', 'Patacotrón 1.6', 'Patacotrón 1.12.2', 'Patacotrón 1.8', 'Patacotrón 1.12']#, 'Patacotrón 1.13.20', 'Patacotrón 1.13.38']
|
91 |
#['Patacotrón 1.5', 'Patacotrón 1.6', 'Patacotrón 1.7', 'Patacotrón 1.12'] #
|
|
|
105 |
|
106 |
threshold = st.slider('¿Cuál va a ser el límite donde se considere patacón? (el valor recomendado es de 75%-80%)', 0, 100, 50, key = 'threshold_convnet')
|
107 |
|
108 |
+
|
109 |
+
|
110 |
selected_models = []
|
111 |
|
112 |
# Set the image dimensions
|
|
|
117 |
with col_b:
|
118 |
|
119 |
uploaded_file = st.file_uploader(key = 'conv_upload', label = 'Sube la imagen a clasificar',type= ['jpg','png', 'jpeg', 'jfif', 'webp', 'heic'])
|
120 |
+
|
121 |
+
st.write(model_choice)
|
122 |
|
123 |
if st.button(key = 'convnet_button', label ='¿Hay un patacón en la imagen?'):
|
124 |
if len(model_choice) < 1:
|