Spaces:
Sleeping
Sleeping
Upload app.py
Browse files
app.py
CHANGED
|
@@ -19,13 +19,13 @@ table tr:nth-child(even) { background: #f5f5f5 !important; }
|
|
| 19 |
table tr:hover { background: #e8e8f0 !important; }
|
| 20 |
"""
|
| 21 |
|
| 22 |
-
|
| 23 |
|
| 24 |
df = pd.read_csv("models-table-free.csv", dtype=str, keep_default_na=False)
|
| 25 |
|
| 26 |
-
for col
|
| 27 |
if col in df.columns:
|
| 28 |
-
df[col] = df[col].apply(lambda x: x[:
|
| 29 |
|
| 30 |
with gr.Blocks(title="Models Table Pro — Free Preview", css=CSS) as demo:
|
| 31 |
gr.Markdown(DESCRIPTION)
|
|
|
|
| 19 |
table tr:hover { background: #e8e8f0 !important; }
|
| 20 |
"""
|
| 21 |
|
| 22 |
+
CLIP = {"Lab": 25, "Notes": 80, "Training dataset": 80, "Tags": 80}
|
| 23 |
|
| 24 |
df = pd.read_csv("models-table-free.csv", dtype=str, keep_default_na=False)
|
| 25 |
|
| 26 |
+
for col, maxlen in CLIP.items():
|
| 27 |
if col in df.columns:
|
| 28 |
+
df[col] = df[col].apply(lambda x: x[:maxlen] + "..." if len(x) > maxlen else x)
|
| 29 |
|
| 30 |
with gr.Blocks(title="Models Table Pro — Free Preview", css=CSS) as demo:
|
| 31 |
gr.Markdown(DESCRIPTION)
|