Spaces:
Runtime error
Runtime error
coder
commited on
Commit
·
b8994d7
1
Parent(s):
7070101
update home
Browse files
Home.py
CHANGED
@@ -51,9 +51,7 @@ class Home(Page):
|
|
51 |
body="""
|
52 |
1. **Cargue su Imagen Base**:
|
53 |
|
54 |
-
|
55 |
-
|
56 |
-
Tendrá dos opciones para cargar su imagen:
|
57 |
|
58 |
* **Desde Galería**: cargue la imagen desde la galería de su teléfono o computadora.
|
59 |
|
@@ -73,8 +71,7 @@ class Home(Page):
|
|
73 |
""")
|
74 |
|
75 |
def expander_imagen_base(self, placeholder):
|
76 |
-
imagen_base = placeholder.
|
77 |
-
label="Imagen base")
|
78 |
imagen_base.markdown(unsafe_allow_html=False,
|
79 |
help=None,
|
80 |
body="""
|
@@ -112,10 +109,10 @@ class Home(Page):
|
|
112 |
self.actualizar_modelo_tokenizer(modelo, tokenizer)
|
113 |
|
114 |
def resultados(self, placeholder):
|
115 |
-
|
116 |
|
117 |
if self.get_global('img_output', None) is not None:
|
118 |
-
|
119 |
image=self.get_global('img_output'),
|
120 |
caption="Su resultado",
|
121 |
use_column_width="auto",
|
@@ -123,14 +120,14 @@ class Home(Page):
|
|
123 |
output_format="auto"
|
124 |
)
|
125 |
if self.get_global('predicciones', None) is not None:
|
126 |
-
|
127 |
'predicciones'), icon=None)
|
128 |
|
129 |
def agregar_card_base(self, columna):
|
130 |
card_principal = columna.container()
|
131 |
|
132 |
columna_inputs, columna_outputs = card_principal.columns(
|
133 |
-
|
134 |
|
135 |
self.expander_instrucciones(columna_inputs)
|
136 |
self.expander_imagen_base(columna_inputs)
|
|
|
51 |
body="""
|
52 |
1. **Cargue su Imagen Base**:
|
53 |
|
54 |
+
Elija cualquiera de las dos opciones para cargar su imagen:
|
|
|
|
|
55 |
|
56 |
* **Desde Galería**: cargue la imagen desde la galería de su teléfono o computadora.
|
57 |
|
|
|
71 |
""")
|
72 |
|
73 |
def expander_imagen_base(self, placeholder):
|
74 |
+
imagen_base = placeholder.container()
|
|
|
75 |
imagen_base.markdown(unsafe_allow_html=False,
|
76 |
help=None,
|
77 |
body="""
|
|
|
109 |
self.actualizar_modelo_tokenizer(modelo, tokenizer)
|
110 |
|
111 |
def resultados(self, placeholder):
|
112 |
+
resultados = placeholder.container()
|
113 |
|
114 |
if self.get_global('img_output', None) is not None:
|
115 |
+
resultados.image(
|
116 |
image=self.get_global('img_output'),
|
117 |
caption="Su resultado",
|
118 |
use_column_width="auto",
|
|
|
120 |
output_format="auto"
|
121 |
)
|
122 |
if self.get_global('predicciones', None) is not None:
|
123 |
+
resultados.success(body=self.get_global(
|
124 |
'predicciones'), icon=None)
|
125 |
|
126 |
def agregar_card_base(self, columna):
|
127 |
card_principal = columna.container()
|
128 |
|
129 |
columna_inputs, columna_outputs = card_principal.columns(
|
130 |
+
[0.3, 0.7], gap="small")
|
131 |
|
132 |
self.expander_instrucciones(columna_inputs)
|
133 |
self.expander_imagen_base(columna_inputs)
|