Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -3394,7 +3394,11 @@ def crear_app():
|
|
| 3394 |
with gr.Row():
|
| 3395 |
with gr.Row():
|
| 3396 |
with gr.Column(scale=2):
|
| 3397 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3398 |
with gr.Column(scale=4):
|
| 3399 |
|
| 3400 |
|
|
@@ -3497,40 +3501,62 @@ def crear_app():
|
|
| 3497 |
|
| 3498 |
## AJUSTE POR FILTROS DE CATEGORIA
|
| 3499 |
with gr.Column():
|
| 3500 |
-
|
| 3501 |
fn=lambda df, categoria, elementos: df[df[categoria].isin(elementos)] if df is not None else None,
|
| 3502 |
-
inputs=[
|
| 3503 |
-
outputs=[
|
| 3504 |
)
|
| 3505 |
|
| 3506 |
-
|
| 3507 |
fn=lambda df, categoria, elementos: df[df[categoria].isin(elementos)] if df is not None else None,
|
| 3508 |
-
inputs=[
|
| 3509 |
-
outputs=[
|
| 3510 |
)
|
| 3511 |
|
| 3512 |
-
|
| 3513 |
fn=lambda df, categoria, elementos: df[df[categoria].isin(elementos)] if df is not None else None,
|
| 3514 |
-
inputs=[
|
| 3515 |
-
outputs=[
|
| 3516 |
)
|
| 3517 |
|
| 3518 |
-
|
| 3519 |
fn=tab_viz19,
|
| 3520 |
-
inputs=[
|
| 3521 |
-
outputs=[
|
| 3522 |
)
|
| 3523 |
|
| 3524 |
-
|
| 3525 |
fn=tab_viz19,
|
| 3526 |
-
inputs=[
|
| 3527 |
-
outputs=[
|
| 3528 |
)
|
| 3529 |
|
| 3530 |
-
|
| 3531 |
fn=tab_viz19,
|
| 3532 |
-
inputs=[
|
| 3533 |
-
outputs=[
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3534 |
)
|
| 3535 |
|
| 3536 |
|
|
|
|
| 3394 |
with gr.Row():
|
| 3395 |
with gr.Row():
|
| 3396 |
with gr.Column(scale=2):
|
| 3397 |
+
html19_1_pmt = gr.HTML(label="Resumen en Tags")
|
| 3398 |
+
with gr.Row(visible=False):
|
| 3399 |
+
html19_2_pmt = gr.HTML(label="Resumen en Tags")
|
| 3400 |
+
# with gr.Column(scale=4):
|
| 3401 |
+
html19_3_pmt = gr.HTML(label="Resumen en Tags")
|
| 3402 |
with gr.Column(scale=4):
|
| 3403 |
|
| 3404 |
|
|
|
|
| 3501 |
|
| 3502 |
## AJUSTE POR FILTROS DE CATEGORIA
|
| 3503 |
with gr.Column():
|
| 3504 |
+
bttn_filtro_categoria_pmt.click(
|
| 3505 |
fn=lambda df, categoria, elementos: df[df[categoria].isin(elementos)] if df is not None else None,
|
| 3506 |
+
inputs=[base_ods_mass_mix_pmt, categorias_mass_pmt_pmt, filtro_categoria_pmt],
|
| 3507 |
+
outputs=[base_ods_mass_mix_cat_pmt]
|
| 3508 |
)
|
| 3509 |
|
| 3510 |
+
bttn_filtro_categoria_pmt.click(
|
| 3511 |
fn=lambda df, categoria, elementos: df[df[categoria].isin(elementos)] if df is not None else None,
|
| 3512 |
+
inputs=[base_meta_mass_mix_pmt, categorias_mass_pmt, filtro_categoria_pmt],
|
| 3513 |
+
outputs=[base_meta_mass_mix_cat_pmt]
|
| 3514 |
)
|
| 3515 |
|
| 3516 |
+
bttn_filtro_categoria_pmt.click(
|
| 3517 |
fn=lambda df, categoria, elementos: df[df[categoria].isin(elementos)] if df is not None else None,
|
| 3518 |
+
inputs=[base_indicadores_mass_mix_pmt, categorias_mass_pmt_pmt, filtro_categoria_pmt],
|
| 3519 |
+
outputs=[base_indicadores_mass_mix_cat_pmt]
|
| 3520 |
)
|
| 3521 |
|
| 3522 |
+
base_ods_mass_mix_cat_pmt.change(
|
| 3523 |
fn=tab_viz19,
|
| 3524 |
+
inputs=[base_ods_mass_mix_cat_pmt, base_meta_mass_mix_cat_pmt, base_indicadores_mass_mix_cat_pmt],
|
| 3525 |
+
outputs=[html19_1_pmt, html19_2_pmt, html19_3_pmt, exp19]
|
| 3526 |
)
|
| 3527 |
|
| 3528 |
+
base_meta_mass_mix_cat_pmt.change(
|
| 3529 |
fn=tab_viz19,
|
| 3530 |
+
inputs=[base_ods_mass_mix_cat_pmt, base_meta_mass_mix_cat_pmt, base_indicadores_mass_mix_cat_pmt],
|
| 3531 |
+
outputs=[html19_1_pmt, html19_2_pmt, html19_3_pmt, exp19]
|
| 3532 |
)
|
| 3533 |
|
| 3534 |
+
base_indicadores_mass_mix_cat_pmt.change(
|
| 3535 |
fn=tab_viz19,
|
| 3536 |
+
inputs=[base_ods_mass_mix_cat_pmt, base_meta_mass_mix_cat_pmt, base_indicadores_mass_mix_cat_pmt],
|
| 3537 |
+
outputs=[html19_1_pmt, html19_2_pmt, html19_3_pmt, exp19]
|
| 3538 |
+
)
|
| 3539 |
+
|
| 3540 |
+
with gr.Column():
|
| 3541 |
+
output_ods_mass_mix.change(
|
| 3542 |
+
fn=tab_viz21_pmt,
|
| 3543 |
+
#df, nivel, umbral_pareto=0.8, metodo='mixto', sim_prop = 0.75, rank_prop=0.20
|
| 3544 |
+
inputs=[output_ods_mass_mix, gr.State('ods'), slider_pareto_ods, gr.State(value='mixto'), slider_prop_sim, slider_prop_rank],
|
| 3545 |
+
outputs=[plot_mass_ods_pmt, exp_mass_ods]
|
| 3546 |
+
)
|
| 3547 |
+
|
| 3548 |
+
output_meta_mass_mix.change(
|
| 3549 |
+
fn=tab_viz21_pmt,
|
| 3550 |
+
#df, nivel, umbral_pareto=0.8, metodo='mixto', sim_prop = 0.75, rank_prop=0.20
|
| 3551 |
+
inputs=[output_meta_mass_mix, gr.State('meta'), slider_pareto_meta, gr.State(value='mixto'), slider_prop_sim, slider_prop_rank],
|
| 3552 |
+
outputs=[plot_mass_metas_pmt, exp_mass_metas]
|
| 3553 |
+
)
|
| 3554 |
+
|
| 3555 |
+
output_indicadores_mass_mix.change(
|
| 3556 |
+
fn=tab_viz21_pmt,
|
| 3557 |
+
#df, nivel, umbral_pareto=0.8, metodo='mixto', sim_prop = 0.75, rank_prop=0.20
|
| 3558 |
+
inputs=[output_indicadores_mass_mix, gr.State('indicador'), slider_pareto_indicador, gr.State(value='mixto'), slider_prop_sim, slider_prop_rank],
|
| 3559 |
+
outputs=[plot_mass_indicadores_pmt, exp_mass_indicadores]
|
| 3560 |
)
|
| 3561 |
|
| 3562 |
|