Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -2139,59 +2139,37 @@ with gr.Blocks(title="DeepBill ~ Extractor Inteligente") as demo:
|
|
| 2139 |
# ============= CONECTAR EVENTOS =============
|
| 2140 |
|
| 2141 |
# Navegaci贸n del men煤
|
|
|
|
|
|
|
|
|
|
| 2142 |
btn_menu_extraccion.click(
|
| 2143 |
-
fn=lambda:
|
| 2144 |
-
|
| 2145 |
-
|
| 2146 |
-
gr.update(visible=False), # section-asistente
|
| 2147 |
-
gr.update(visible=False), # section-analisis
|
| 2148 |
-
gr.update(visible=False), # section-traduccion
|
| 2149 |
-
gr.update(visible=False) # section-ayuda
|
| 2150 |
-
]
|
| 2151 |
)
|
| 2152 |
|
| 2153 |
btn_menu_asistente.click(
|
| 2154 |
-
fn=lambda:
|
| 2155 |
-
|
| 2156 |
-
|
| 2157 |
-
gr.update(visible=True), # section-asistente
|
| 2158 |
-
gr.update(visible=False), # section-analisis
|
| 2159 |
-
gr.update(visible=False), # section-traduccion
|
| 2160 |
-
gr.update(visible=False) # section-ayuda
|
| 2161 |
-
]
|
| 2162 |
)
|
| 2163 |
|
| 2164 |
btn_menu_analisis.click(
|
| 2165 |
-
fn=lambda:
|
| 2166 |
-
|
| 2167 |
-
|
| 2168 |
-
gr.update(visible=False), # section-asistente
|
| 2169 |
-
gr.update(visible=True), # section-analisis
|
| 2170 |
-
gr.update(visible=False), # section-traduccion
|
| 2171 |
-
gr.update(visible=False) # section-ayuda
|
| 2172 |
-
]
|
| 2173 |
)
|
| 2174 |
|
| 2175 |
btn_menu_traduccion.click(
|
| 2176 |
-
fn=lambda:
|
| 2177 |
-
|
| 2178 |
-
|
| 2179 |
-
gr.update(visible=False), # section-asistente
|
| 2180 |
-
gr.update(visible=False), # section-analisis
|
| 2181 |
-
gr.update(visible=True), # section-traduccion
|
| 2182 |
-
gr.update(visible=False) # section-ayuda
|
| 2183 |
-
]
|
| 2184 |
)
|
| 2185 |
|
| 2186 |
btn_menu_ayuda.click(
|
| 2187 |
-
fn=lambda:
|
| 2188 |
-
|
| 2189 |
-
|
| 2190 |
-
gr.update(visible=False), # section-asistente
|
| 2191 |
-
gr.update(visible=False), # section-analisis
|
| 2192 |
-
gr.update(visible=False), # section-traduccion
|
| 2193 |
-
gr.update(visible=True) # section-ayuda
|
| 2194 |
-
]
|
| 2195 |
)
|
| 2196 |
# Extracci贸n autom谩tica
|
| 2197 |
def procesar_con_loading(pdf_file):
|
|
|
|
| 2139 |
# ============= CONECTAR EVENTOS =============
|
| 2140 |
|
| 2141 |
# Navegaci贸n del men煤
|
| 2142 |
+
# ============= CONECTAR EVENTOS =============
|
| 2143 |
+
|
| 2144 |
+
# Navegaci贸n del men煤 - usando los componentes directamente
|
| 2145 |
btn_menu_extraccion.click(
|
| 2146 |
+
fn=lambda: (gr.update(visible=True), gr.update(visible=False), gr.update(visible=False),
|
| 2147 |
+
gr.update(visible=False), gr.update(visible=False)),
|
| 2148 |
+
outputs=[seccion_extraccion, seccion_asistente, seccion_analisis, seccion_traduccion, seccion_ayuda]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2149 |
)
|
| 2150 |
|
| 2151 |
btn_menu_asistente.click(
|
| 2152 |
+
fn=lambda: (gr.update(visible=False), gr.update(visible=True), gr.update(visible=False),
|
| 2153 |
+
gr.update(visible=False), gr.update(visible=False)),
|
| 2154 |
+
outputs=[seccion_extraccion, seccion_asistente, seccion_analisis, seccion_traduccion, seccion_ayuda]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2155 |
)
|
| 2156 |
|
| 2157 |
btn_menu_analisis.click(
|
| 2158 |
+
fn=lambda: (gr.update(visible=False), gr.update(visible=False), gr.update(visible=True),
|
| 2159 |
+
gr.update(visible=False), gr.update(visible=False)),
|
| 2160 |
+
outputs=[seccion_extraccion, seccion_asistente, seccion_analisis, seccion_traduccion, seccion_ayuda]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2161 |
)
|
| 2162 |
|
| 2163 |
btn_menu_traduccion.click(
|
| 2164 |
+
fn=lambda: (gr.update(visible=False), gr.update(visible=False), gr.update(visible=False),
|
| 2165 |
+
gr.update(visible=True), gr.update(visible=False)),
|
| 2166 |
+
outputs=[seccion_extraccion, seccion_asistente, seccion_analisis, seccion_traduccion, seccion_ayuda]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2167 |
)
|
| 2168 |
|
| 2169 |
btn_menu_ayuda.click(
|
| 2170 |
+
fn=lambda: (gr.update(visible=False), gr.update(visible=False), gr.update(visible=False),
|
| 2171 |
+
gr.update(visible=False), gr.update(visible=True)),
|
| 2172 |
+
outputs=[seccion_extraccion, seccion_asistente, seccion_analisis, seccion_traduccion, seccion_ayuda]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2173 |
)
|
| 2174 |
# Extracci贸n autom谩tica
|
| 2175 |
def procesar_con_loading(pdf_file):
|