frncscp commited on
Commit
e52cba6
1 Parent(s): b6305a8

Update pages/Entorno de Ejecución.py

Browse files
Files changed (1) hide show
  1. pages/Entorno de Ejecución.py +2 -1
pages/Entorno de Ejecución.py CHANGED
@@ -7,7 +7,7 @@ import os
7
  import cv2
8
  import numpy as np
9
 
10
- zsloaded = False
11
 
12
  st.set_page_config(
13
  page_title = 'Patacotrón',
@@ -197,6 +197,7 @@ with zero_shot:
197
  with st.spinner("Cargando modelo de clasificación..."):
198
  classifier = pipeline("zero-shot-image-classification", model = 'openai/clip-vit-large-patch14-336')
199
  zsloaded = True
 
200
  with st.spinner('Cargando predicción...'):
201
  img = preprocess(uploaded_file, module = 'pil')
202
  zs_classifier = classifier(img,
 
7
  import cv2
8
  import numpy as np
9
 
10
+ zsloaded = st.session_state.get('zsloaded', False)
11
 
12
  st.set_page_config(
13
  page_title = 'Patacotrón',
 
197
  with st.spinner("Cargando modelo de clasificación..."):
198
  classifier = pipeline("zero-shot-image-classification", model = 'openai/clip-vit-large-patch14-336')
199
  zsloaded = True
200
+ st.session_state['zsloaded'] = zsloaded
201
  with st.spinner('Cargando predicción...'):
202
  img = preprocess(uploaded_file, module = 'pil')
203
  zs_classifier = classifier(img,