Spaces:
Running
Running
Update pages/Entorno de Ejecución.py
Browse files
pages/Entorno de Ejecución.py
CHANGED
@@ -181,7 +181,7 @@ with vit:
|
|
181 |
with zero_shot:
|
182 |
|
183 |
col_a, col_b = st.columns(2)
|
184 |
-
zsloaded =
|
185 |
|
186 |
with col_a:
|
187 |
|
@@ -198,13 +198,13 @@ with zero_shot:
|
|
198 |
with col_b:
|
199 |
|
200 |
if st.button(key = 'clip_button', label = 'Cargar modelo de clasificación (puede tomar algo de tiempo)'):
|
201 |
-
zsloaded
|
202 |
classifier = load_clip()
|
203 |
|
204 |
|
205 |
if st.button(key = 'ZS_button', label ='¿Hay un patacón en la imagen?'):
|
206 |
if uploaded_file is not None:
|
207 |
-
if zsloaded:
|
208 |
with st.spinner('Cargando predicción...'):
|
209 |
img = preprocess(uploaded_file, module = 'pil')
|
210 |
zs_classifier = classifier(img,
|
|
|
181 |
with zero_shot:
|
182 |
|
183 |
col_a, col_b = st.columns(2)
|
184 |
+
zsloaded = []
|
185 |
|
186 |
with col_a:
|
187 |
|
|
|
198 |
with col_b:
|
199 |
|
200 |
if st.button(key = 'clip_button', label = 'Cargar modelo de clasificación (puede tomar algo de tiempo)'):
|
201 |
+
zsloaded.append(1)
|
202 |
classifier = load_clip()
|
203 |
|
204 |
|
205 |
if st.button(key = 'ZS_button', label ='¿Hay un patacón en la imagen?'):
|
206 |
if uploaded_file is not None:
|
207 |
+
if len(zsloaded) > 0:
|
208 |
with st.spinner('Cargando predicción...'):
|
209 |
img = preprocess(uploaded_file, module = 'pil')
|
210 |
zs_classifier = classifier(img,
|