Spaces:
Running
Running
Fix responses column with markdown renderer
Browse files265 unmodified lines266267268269270271272273247 unmodified lines521522523524525526265 unmodified lines"field": "sample_responses_url","headerName": "Responses","width": 110,"cellDataType": False,"cellRenderer": {"function": "params.value ? '<a href=\"' + params.value + '\" target=\"_blank\" rel=\"noopener noreferrer\">📄 View</a>' : ''"},},]247 unmodified linesif tab == "models":# Models leaderboard viewcol_defs = get_model_column_defs(df)row_data = df.to_dict("records") if len(df) > 0 else []return html.Div([265 unmodified lines266267268269270271272247 unmodified lines520521522523524525526527528529530531265 unmodified lines"field": "sample_responses_url","headerName": "Responses","width": 110,"cellRenderer": "markdown",},]247 unmodified linesif tab == "models":# Models leaderboard viewcol_defs = get_model_column_defs(df)# Transform sample_responses_url to clickable link textif len(df) > 0:df["sample_responses_url"] = df["sample_responses_url"].apply(lambda x: f"[📄 View]({x})" if pd.notna(x) and x else "")row_data = df.to_dict("records") if len(df) > 0 else []return html.Div([
app.py+7-2