Spaces:
Runtime error
Runtime error
Commit
·
93d3457
1
Parent(s):
fb8887a
Update app.py
Browse files
app.py
CHANGED
@@ -28,9 +28,32 @@ def convertir_rgb(img):
|
|
28 |
else:
|
29 |
return img
|
30 |
|
31 |
-
|
32 |
image_file = st.file_uploader("Sube aquí tu imagen.", type=["png","jpg","jpeg"])
|
33 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
34 |
|
35 |
if image_file is not None:
|
36 |
|
|
|
28 |
else:
|
29 |
return img
|
30 |
|
31 |
+
|
32 |
image_file = st.file_uploader("Sube aquí tu imagen.", type=["png","jpg","jpeg"])
|
33 |
|
34 |
+
ejemplos = ["dientes_1.png", "dientes_2.png", "dientes_3.png"]
|
35 |
+
|
36 |
+
## Creamos tres columnas; en cada una estará una imagen ejemplo
|
37 |
+
col1, col2, col3 = st.columns(3)
|
38 |
+
with col1:
|
39 |
+
## Se carga la imagen y se muestra en la interfaz
|
40 |
+
ex = Image.open(ejemplos[0])
|
41 |
+
st.image(ex, width=200)
|
42 |
+
## Si oprime el botón entonces usaremos ese ejemplo en el modelo
|
43 |
+
if st.button("Corre este ejemplo 1"):
|
44 |
+
archivo_imagen = ejemplos[0]
|
45 |
+
|
46 |
+
with col2:
|
47 |
+
ex1 = Image.open(ejemplos[1])
|
48 |
+
st.image(ex1, width=200)
|
49 |
+
if st.button("Corre este ejemplo 2"):
|
50 |
+
archivo_imagen = ejemplos[1]
|
51 |
+
|
52 |
+
with col3:
|
53 |
+
ex2 = Image.open(ejemplos[2])
|
54 |
+
st.image(ex2, width=200)
|
55 |
+
if st.button("Corre este ejemplo 3"):
|
56 |
+
archivo_imagen = ejemplos[2]
|
57 |
|
58 |
if image_file is not None:
|
59 |
|