Upload folder using huggingface_hub
Browse files
app.py
CHANGED
|
@@ -1759,11 +1759,11 @@ def _load_cluster_csv(model, min_val, threshold):
|
|
| 1759 |
"""Return the ALL_FIELDS dataframe or None. Supports .csv.gz and .csv."""
|
| 1760 |
base = os.path.join(GRID_BASE, f"model={model}", f"min={min_val}",
|
| 1761 |
f"t={threshold}_ALL_FIELDS")
|
| 1762 |
-
print(f"[debug] _load_cluster_csv: GRID_BASE={GRID_BASE}, model={model}, min={min_val}, t={threshold}")
|
| 1763 |
for ext in (".csv.gz", ".csv"):
|
| 1764 |
path = base + ext
|
| 1765 |
exists = os.path.isfile(path)
|
| 1766 |
-
print(f"[debug] trying {path} -> exists={exists}")
|
| 1767 |
if not exists:
|
| 1768 |
continue
|
| 1769 |
try:
|
|
@@ -1962,9 +1962,11 @@ def _distribution_figure(cdf, field_name, top_n=20):
|
|
| 1962 |
Input("cluster-group-filter", "value"),
|
| 1963 |
)
|
| 1964 |
def update_cluster_plot(model, min_val, threshold, field, plot_type, top_n, groups):
|
|
|
|
| 1965 |
empty_fig = go.Figure()
|
| 1966 |
empty_fig.update_layout(paper_bgcolor="#ffffff", plot_bgcolor="#f9fafc")
|
| 1967 |
if not all([model, min_val, threshold, field, plot_type]):
|
|
|
|
| 1968 |
return empty_fig, "Select all parameters above."
|
| 1969 |
|
| 1970 |
cdf = _load_cluster_csv(model, min_val, threshold)
|
|
|
|
| 1759 |
"""Return the ALL_FIELDS dataframe or None. Supports .csv.gz and .csv."""
|
| 1760 |
base = os.path.join(GRID_BASE, f"model={model}", f"min={min_val}",
|
| 1761 |
f"t={threshold}_ALL_FIELDS")
|
| 1762 |
+
print(f"[debug] _load_cluster_csv: GRID_BASE={GRID_BASE}, model={model}, min={min_val}, t={threshold}", flush=True)
|
| 1763 |
for ext in (".csv.gz", ".csv"):
|
| 1764 |
path = base + ext
|
| 1765 |
exists = os.path.isfile(path)
|
| 1766 |
+
print(f"[debug] trying {path} -> exists={exists}", flush=True)
|
| 1767 |
if not exists:
|
| 1768 |
continue
|
| 1769 |
try:
|
|
|
|
| 1962 |
Input("cluster-group-filter", "value"),
|
| 1963 |
)
|
| 1964 |
def update_cluster_plot(model, min_val, threshold, field, plot_type, top_n, groups):
|
| 1965 |
+
print(f"[debug] update_cluster_plot called: model={model}, min={min_val}, t={threshold}, field={field}, plot_type={plot_type}", flush=True)
|
| 1966 |
empty_fig = go.Figure()
|
| 1967 |
empty_fig.update_layout(paper_bgcolor="#ffffff", plot_bgcolor="#f9fafc")
|
| 1968 |
if not all([model, min_val, threshold, field, plot_type]):
|
| 1969 |
+
print(f"[debug] early return: missing values", flush=True)
|
| 1970 |
return empty_fig, "Select all parameters above."
|
| 1971 |
|
| 1972 |
cdf = _load_cluster_csv(model, min_val, threshold)
|