Spaces:
Runtime error
Runtime error
Update app.py
Browse files90 unmodified lines91929394959697989990 unmodified linesdf = pd.DataFrame(data)fig_orig = make_plot(load_data(), "Original Layout (Frozen)")fig_edit = make_plot(df, "Edited Layout")options = [{"label": str(n), "value": n} for n in sorted(df["LED Number"].unique())]sorted_wv = sorted(df["Wavelength"].dropna().unique())legend = "Used Wavelengths: " + ", ".join(str(w) for w in sorted_wv)return fig_orig, fig_edit, options, legend@app.callback(90 unmodified lines91929394959697989910010110210310410510610710810911011111211311411590 unmodified linesdf = pd.DataFrame(data)fig_orig = make_plot(load_data(), "Original Layout (Frozen)")fig_edit = make_plot(df, "Edited Layout")# Used wavelengthssorted_wv = sorted(df["Wavelength"].dropna().unique())used_text = "Used Wavelengths: " + ", ".join(str(w) for w in sorted_wv)# Expected full 22 wavelengths (IEC/bin-set)expected = [365, 385, 405, 420, 430, 450, 470, 505, 520, 550, 585,610, 630, 660, 680, 730, 760, 810, 850, 880, 940, 1050]missing = sorted(set(expected) - set(sorted_wv))missing_text = "Missing Wavelengths: " + (", ".join(str(w) for w in missing) if missing else "None")legend = html.Div([html.Div(used_text),html.Div(missing_text, style={"color": "red"})])options = [{"label": str(n), "value": n} for n in sorted(df["LED Number"].unique())]return fig_orig, fig_edit, options, legend@app.callback(
app.py+18-2