de-Rodrigo commited on
Commit
171ba4c
1 Parent(s): 86cb706

Include Checker

Browse files
Files changed (1) hide show
  1. app.py +10 -0
app.py CHANGED
@@ -1655,6 +1655,10 @@ def run_model(model_name):
1655
  heatmap_fig.add_tools(hover_tool_points)
1656
 
1657
  # Mostrar el heatmap en la app
 
 
 
 
1658
  st.bokeh_chart(heatmap_fig)
1659
 
1660
  # Bot贸n para descargar df_all (Embeddings in PCA Space)
@@ -1948,6 +1952,12 @@ def run_model(model_name):
1948
  key=f"download_tsne_coordinates_{model_name}"
1949
  )
1950
 
 
 
 
 
 
 
1951
 
1952
  def main():
1953
  config_style()
 
1655
  heatmap_fig.add_tools(hover_tool_points)
1656
 
1657
  # Mostrar el heatmap en la app
1658
+ check_array("heatmap_data", heatmap_data)
1659
+ check_array("transparent_layer", transparent_layer if 'transparent_layer' in locals() else None)
1660
+ check_array("df_heatmap['x']", df_heatmap["x"])
1661
+ check_array("df_heatmap['y']", df_heatmap["y"])
1662
  st.bokeh_chart(heatmap_fig)
1663
 
1664
  # Bot贸n para descargar df_all (Embeddings in PCA Space)
 
1952
  key=f"download_tsne_coordinates_{model_name}"
1953
  )
1954
 
1955
+ def check_array(name, arr):
1956
+ if arr is None:
1957
+ return
1958
+ arr = np.array(arr)
1959
+ print(f"[DEBUG] {name}: shape={arr.shape}, dtype={arr.dtype}")
1960
+ print(f" nan={np.isnan(arr).sum()}, inf={np.isinf(arr).sum()}, max={np.nanmax(arr):.3e}, min={np.nanmin(arr):.3e}")
1961
 
1962
  def main():
1963
  config_style()