# AUTOGENERATED! DO NOT EDIT! File to edit: app.ipynb. # %% auto 0 __all__ = ['columns_to_click', 'title', 'description', 'dtypes', 'get_data'] # %% app.ipynb 0 import gradio as gr import pandas as pd # %% app.ipynb 1 columns_to_click = ["Paper / Repo", "Playground"] def get_data(): # Load the CSV file into a DataFrame df = pd.read_csv( #test "https://docs.google.com/spreadsheets/d/e/2PACX-1vTmhqd7F40mODp2OeQLAn0t_IUd2tjGx0XIWt98HsKORKlejOGsrk6RP9rjjLF7k4krAkrce1FzlluT/pub?output=csv", "https://docs.google.com/spreadsheets/d/e/2PACX-1vSC40sszorOjHfozmNqJT9lFiJhG94u3fbr3Ss_7fzcU3xqqJQuW1Ie_SNcWEB-uIsBi9NBUK7-ddet/pub?output=csv", skiprows=1, ) print("df.columns: ", df.columns) # Drop rows where the 'Model' column is NaN df.dropna(subset=['Model'], inplace=True) # Drop rows where the 'Parameters \n(B)' column is 'TBA' df = df[df["Announced\n▼"] != "TBA"] # Apply make_clickable_cell to the specified columns for col in columns_to_click: df[col] = df[col].apply(make_clickable_cell) return df # %% app.ipynb 2 # Drop footers df = df.copy()[~df["Model"].isna()] # %% app.ipynb 3 # Drop TBA models df = df.copy()[df["Announced\n▼"] != "TBA"] # %% app.ipynb 6 def make_clickable_cell(cell): if pd.isnull(cell): return "" else: return f'{cell}' # Load the data to get the columns for setting up datatype dataframe = get_data() dtypes = ["str" if c not in columns_to_click else "html" for c in dataframe.columns] # %% app.ipynb 2 title = """