Spaces:
Runtime error
Runtime error
coder
commited on
Commit
·
2208c4e
1
Parent(s):
717eab8
nose
Browse files- Home.py +46 -2
- core/estilos/home.css +5 -5
Home.py
CHANGED
@@ -12,7 +12,13 @@ class Home(Page):
|
|
12 |
},
|
13 |
"img_output": None,
|
14 |
"predicciones": None,
|
|
|
|
|
|
|
|
|
|
|
15 |
}
|
|
|
16 |
archivos_css = ["main",
|
17 |
"home"]
|
18 |
|
@@ -24,6 +30,44 @@ class Home(Page):
|
|
24 |
self.init_globals(globals=self.variables_globales)
|
25 |
for archivo in self.archivos_css:
|
26 |
self.cargar_css(archivo_css=archivo)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
27 |
|
28 |
def obtener_bytes(self, archivo):
|
29 |
self.set_global(key='img_src',
|
@@ -84,7 +128,7 @@ class Home(Page):
|
|
84 |
help="Suba un archivo.") and _archivo is not None):
|
85 |
self.obtener_bytes(_archivo)
|
86 |
|
87 |
-
camara_expander = imagen_base.expander(expanded=False,
|
88 |
label="Desde su Cámara")
|
89 |
_captura = camara_expander.camera_input(label="Cámara",
|
90 |
on_change=None,
|
@@ -137,7 +181,7 @@ class Home(Page):
|
|
137 |
self.resultados(columna_outputs)
|
138 |
|
139 |
def build(self):
|
140 |
-
|
141 |
columna_principal = self.get_body().columns(1, gap="small")[0]
|
142 |
self.agregar_card_base(columna_principal)
|
143 |
|
|
|
12 |
},
|
13 |
"img_output": None,
|
14 |
"predicciones": None,
|
15 |
+
"fuentes": [
|
16 |
+
{"titulo": "Analysis of Classification by Supervised and Unsupervised Learning",
|
17 |
+
"url": "https://www.computer.org/csdl/proceedings-article/iccima/2007/30500280/12OmNzxyiHV"},
|
18 |
+
{"titulo": "Implementation of Interval Arithmetic Algorithms on FPGAs",
|
19 |
+
"url": "https://dl.acm.org/doi/10.1109/ICCIMA.2007.237"}]
|
20 |
}
|
21 |
+
|
22 |
archivos_css = ["main",
|
23 |
"home"]
|
24 |
|
|
|
30 |
self.init_globals(globals=self.variables_globales)
|
31 |
for archivo in self.archivos_css:
|
32 |
self.cargar_css(archivo_css=archivo)
|
33 |
+
self.about()
|
34 |
+
|
35 |
+
def about(self):
|
36 |
+
self.builder().sidebar.markdown(unsafe_allow_html=False,
|
37 |
+
help=None,
|
38 |
+
body="""
|
39 |
+
## Clasificación de imágenes
|
40 |
+
|
41 |
+
La **clasificación de imágenes**, es una rama esencial de la **visión artificial**, se refiere a la **capacidad de las computadoras** para **identificar y categorizar** objetos en **imágenes visuales.**
|
42 |
+
|
43 |
+
Consiste en enseñar a una computadora a **identificar la categoría general de una fotografía**, como "perro" o "coche", en lugar de analizar detalles específicos o ubicar objetos.
|
44 |
+
|
45 |
+
## Recursos
|
46 |
+
|
47 |
+
|
48 |
+
##
|
49 |
+
""")
|
50 |
+
|
51 |
+
for fuente in self.get_global('fuentes'):
|
52 |
+
self.builder().sidebar.markdown(
|
53 |
+
unsafe_allow_html=False,
|
54 |
+
help=None,
|
55 |
+
body=f"""
|
56 |
+
###### * **{fuente.get('titulo')}:**
|
57 |
+
|
58 |
+
*Enlace: {fuente.get('url')}*
|
59 |
+
"""
|
60 |
+
)
|
61 |
+
self.builder().sidebar.markdown(
|
62 |
+
unsafe_allow_html=False,
|
63 |
+
help=None,
|
64 |
+
body="""
|
65 |
+
###### Es **importante** mencionar que esta **compilación** se encuentra en proceso de **construcción**.
|
66 |
+
|
67 |
+
*Si deseas **participar**, eres **bienvenido** de aportar en el repositorio oficial:*
|
68 |
+
|
69 |
+
https://github.com/coder160/cuadernos/
|
70 |
+
""")
|
71 |
|
72 |
def obtener_bytes(self, archivo):
|
73 |
self.set_global(key='img_src',
|
|
|
128 |
help="Suba un archivo.") and _archivo is not None):
|
129 |
self.obtener_bytes(_archivo)
|
130 |
|
131 |
+
camara_expander = imagen_base.expander(expanded=False,
|
132 |
label="Desde su Cámara")
|
133 |
_captura = camara_expander.camera_input(label="Cámara",
|
134 |
on_change=None,
|
|
|
181 |
self.resultados(columna_outputs)
|
182 |
|
183 |
def build(self):
|
184 |
+
|
185 |
columna_principal = self.get_body().columns(1, gap="small")[0]
|
186 |
self.agregar_card_base(columna_principal)
|
187 |
|
core/estilos/home.css
CHANGED
@@ -30,13 +30,13 @@
|
|
30 |
/* Interno Card: Texto */
|
31 |
[data-testid="stVerticalBlock"]>[style*="flex-direction: column;"]>[data-testid="stVerticalBlock"]>[data-testid="element-container"]>.stTextLabelWrapper>[data-testid="stText"] {
|
32 |
padding: 0px 8px 0px 8px;
|
33 |
-
color:white;
|
34 |
}
|
35 |
|
36 |
/* Interno Card: Markup */
|
37 |
[data-testid="stVerticalBlock"]>[style*="flex-direction: column;"]>[data-testid="stVerticalBlock"]>[data-testid="element-container"]>.stMarkdown>[data-testid="stMarkdownContainer"] {
|
38 |
padding: 0px 8px 0px 8px;
|
39 |
-
color:white;
|
40 |
}
|
41 |
|
42 |
/* Interno Card: Row imagenes */
|
@@ -53,7 +53,7 @@
|
|
53 |
}
|
54 |
|
55 |
/* Interno Card: Botones */
|
56 |
-
[data-testid="stVerticalBlock"]>[style*="flex-direction: column;"]>[data-testid="stVerticalBlock"]>[data-testid="element-container"]>[data-testid="stButton"]>.stTooltipIcon>div>[data-testid="stTooltipIcon"]>[data-testid="tooltipHoverTarget"]>button{
|
57 |
padding: 8px;
|
58 |
display: flex;
|
59 |
justify-content: center;
|
@@ -71,6 +71,6 @@
|
|
71 |
border: none;
|
72 |
}
|
73 |
|
74 |
-
.st-by{
|
75 |
-
color:white !important;
|
76 |
}
|
|
|
30 |
/* Interno Card: Texto */
|
31 |
[data-testid="stVerticalBlock"]>[style*="flex-direction: column;"]>[data-testid="stVerticalBlock"]>[data-testid="element-container"]>.stTextLabelWrapper>[data-testid="stText"] {
|
32 |
padding: 0px 8px 0px 8px;
|
33 |
+
color: white;
|
34 |
}
|
35 |
|
36 |
/* Interno Card: Markup */
|
37 |
[data-testid="stVerticalBlock"]>[style*="flex-direction: column;"]>[data-testid="stVerticalBlock"]>[data-testid="element-container"]>.stMarkdown>[data-testid="stMarkdownContainer"] {
|
38 |
padding: 0px 8px 0px 8px;
|
39 |
+
color: white;
|
40 |
}
|
41 |
|
42 |
/* Interno Card: Row imagenes */
|
|
|
53 |
}
|
54 |
|
55 |
/* Interno Card: Botones */
|
56 |
+
[data-testid="stVerticalBlock"]>[style*="flex-direction: column;"]>[data-testid="stVerticalBlock"]>[data-testid="element-container"]>[data-testid="stButton"]>.stTooltipIcon>div>[data-testid="stTooltipIcon"]>[data-testid="tooltipHoverTarget"]>button {
|
57 |
padding: 8px;
|
58 |
display: flex;
|
59 |
justify-content: center;
|
|
|
71 |
border: none;
|
72 |
}
|
73 |
|
74 |
+
.st-by {
|
75 |
+
color: white !important;
|
76 |
}
|