frncscp commited on
Commit
285a160
1 Parent(s): b8037f4

Update pages/Entorno de Ejecución.py

Browse files
Files changed (1) hide show
  1. pages/Entorno de Ejecución.py +3 -3
pages/Entorno de Ejecución.py CHANGED
@@ -134,11 +134,11 @@ with vit:
134
  with col_a:
135
  st.title('Visual Transformer')
136
  st.caption('One class is all you need!')
137
- uploaded_file = st.file_uploader(label = 'Sube la imagen a clasificar',type= ['jpg','png', 'jpeg', 'jfif', 'webp', 'heic'])
138
  if st.button('¿Hay un patacón en la imagen?'):
139
- if uploaded_file is not None:
140
  classifier = pipeline("image-classification", model="frncscp/patacoptimus-prime")
141
- img = preprocess(uploaded_file)
142
  raw_img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)
143
  img = cv2.resize(img, (IMAGE_WIDTH, IMAGE_HEIGHT))
144
  classifier(img)
 
134
  with col_a:
135
  st.title('Visual Transformer')
136
  st.caption('One class is all you need!')
137
+ uploaded_file_t = st.file_uploader(label = 'Sube la imagen a clasificar',type= ['jpg','png', 'jpeg', 'jfif', 'webp', 'heic'])
138
  if st.button('¿Hay un patacón en la imagen?'):
139
+ if uploaded_file_t is not None:
140
  classifier = pipeline("image-classification", model="frncscp/patacoptimus-prime")
141
+ img = preprocess(uploaded_file_t)
142
  raw_img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)
143
  img = cv2.resize(img, (IMAGE_WIDTH, IMAGE_HEIGHT))
144
  classifier(img)