frncscp commited on
Commit
1f4eee8
·
1 Parent(s): 2b50937

Update pages/Entorno de Ejecución.py

Browse files
Files changed (1) hide show
  1. pages/Entorno de Ejecución.py +6 -6
pages/Entorno de Ejecución.py CHANGED
@@ -141,12 +141,12 @@ with vit:
141
  uploaded_file = st.file_uploader(key = 'ViT_upload', label = 'Sube la imagen a clasificar',type= ['jpg','png', 'jpeg', 'jfif', 'webp', 'heic'])
142
  if st.button(key = 'ViT_button', label ='¿Hay un patacón en la imagen?'):
143
  if uploaded_file is not None:
144
- with st.spinner('Cargando predicción...', key = 'vitspinner')
145
- classifier = pipeline("image-classification", model="frncscp/patacoptimus-prime")
146
- img = preprocess(uploaded_file, module = 'pil')
147
- raw_img = img
148
- img = cv2.resize(img, (IMAGE_WIDTH, IMAGE_HEIGHT))
149
- classifier(img)
150
  else:
151
  st.write("Asegúrate de haber subido correctamente la imagen.")
152
 
 
141
  uploaded_file = st.file_uploader(key = 'ViT_upload', label = 'Sube la imagen a clasificar',type= ['jpg','png', 'jpeg', 'jfif', 'webp', 'heic'])
142
  if st.button(key = 'ViT_button', label ='¿Hay un patacón en la imagen?'):
143
  if uploaded_file is not None:
144
+ with st.spinner('Cargando predicción...', key = 'vitspinner'):
145
+ classifier = pipeline("image-classification", model="frncscp/patacoptimus-prime")
146
+ img = preprocess(uploaded_file, module = 'pil')
147
+ raw_img = img
148
+ img = cv2.resize(img, (IMAGE_WIDTH, IMAGE_HEIGHT))
149
+ classifier(img)
150
  else:
151
  st.write("Asegúrate de haber subido correctamente la imagen.")
152