lfernandopg commited on
Commit
ec94335
1 Parent(s): da6c3e3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -1
app.py CHANGED
@@ -1,13 +1,21 @@
1
  import streamlit as st
2
  from PIL import Image
3
  import tensorflow as tf
 
4
 
5
  model = tf.keras.models.load_model('modelo.h5')
6
 
7
  file = st.file_uploader("Por favor suba una imagen de ropa (jpg, png, jpeg)", type=['jpg','png','jpeg'])
8
  if file is not None:
9
  bytes_data = file.read()
10
-
 
 
 
 
 
 
 
11
  col1, col2, col3 = st.columns(3)
12
 
13
  with col1:
 
1
  import streamlit as st
2
  from PIL import Image
3
  import tensorflow as tf
4
+ import matplotlib.pyplot as plt
5
 
6
  model = tf.keras.models.load_model('modelo.h5')
7
 
8
  file = st.file_uploader("Por favor suba una imagen de ropa (jpg, png, jpeg)", type=['jpg','png','jpeg'])
9
  if file is not None:
10
  bytes_data = file.read()
11
+ x = np.array(Image.open(BytesIO(bytes_data)))
12
+ x = x / 255.00
13
+ plt.figure()
14
+ plt.imshow(imagen, cmap=plt.cm.binary)
15
+ plt.colorbar()
16
+ plt.grid(False)
17
+ plt.show()
18
+
19
  col1, col2, col3 = st.columns(3)
20
 
21
  with col1: