C2MV commited on
Commit
4e106ba
verified
1 Parent(s): e7df5cc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -47,7 +47,8 @@ def ajustar_decimales_evento(df, decimales):
47
  col_predicha = [col for col in df.columns if 'Concentraci贸n Predicha' in col][0]
48
  # Redondear la columna al n煤mero de decimales especificado
49
  df[col_predicha] = df[col_predicha].astype(float).round(decimales)
50
- return df
 
51
 
52
  def generar_datos_sinteticos(df, desviacion_std):
53
  col_predicha = [col for col in df.columns if 'Predicha' in col][0]
@@ -481,6 +482,7 @@ with gr.Blocks(theme=gr.themes.Soft()) as interfaz:
481
  interactive=True,
482
  datatype=["number", "number", "number", "number", "number"],
483
  type="pandas",
 
484
  )
485
 
486
  with gr.Tab("馃搳 An谩lisis y Reporte"):
 
47
  col_predicha = [col for col in df.columns if 'Concentraci贸n Predicha' in col][0]
48
  # Redondear la columna al n煤mero de decimales especificado
49
  df[col_predicha] = df[col_predicha].astype(float).round(decimales)
50
+ # Actualizar el componente DataFrame con la nueva precisi贸n
51
+ return gr.update(value=df, precision=decimales)
52
 
53
  def generar_datos_sinteticos(df, desviacion_std):
54
  col_predicha = [col for col in df.columns if 'Predicha' in col][0]
 
482
  interactive=True,
483
  datatype=["number", "number", "number", "number", "number"],
484
  type="pandas",
485
+ precision=0 # Establecer precisi贸n inicial
486
  )
487
 
488
  with gr.Tab("馃搳 An谩lisis y Reporte"):