Spaces:
Running
Running
neurips 2024
Browse files- df/PaperCentral.py +13 -9
df/PaperCentral.py
CHANGED
@@ -23,6 +23,7 @@ class PaperCentral:
|
|
23 |
"""
|
24 |
|
25 |
CONFERENCES_ICONS = {
|
|
|
26 |
"EMNLP2024": 'https://aclanthology.org/aclicon.ico',
|
27 |
"CoRL2024": CORL_ICO,
|
28 |
"ACMMM2024": "https://2024.acmmm.org/favicon.ico",
|
@@ -392,6 +393,12 @@ class PaperCentral:
|
|
392 |
|
393 |
# Handle Hugging Face options
|
394 |
if hf_options:
|
|
|
|
|
|
|
|
|
|
|
|
|
395 |
if "🤗 artifacts" in hf_options:
|
396 |
filtered_df = filtered_df[
|
397 |
(filtered_df['paper_page'] != "") & (filtered_df['paper_page'].notna())
|
@@ -407,28 +414,25 @@ class PaperCentral:
|
|
407 |
if 'num_spaces' not in columns_to_show:
|
408 |
columns_to_show.append('num_spaces')
|
409 |
|
|
|
|
|
|
|
|
|
|
|
|
|
410 |
if "datasets" in hf_options:
|
411 |
if 'num_datasets' not in columns_to_show:
|
412 |
columns_to_show.append('num_datasets')
|
413 |
-
# Convert to integer, handling possible non-numeric values
|
414 |
-
filtered_df['num_datasets'] = pd.to_numeric(filtered_df['num_datasets'], errors='coerce').fillna(
|
415 |
-
0).astype(int)
|
416 |
filtered_df = filtered_df[filtered_df['num_datasets'] != 0]
|
417 |
|
418 |
if "models" in hf_options:
|
419 |
if 'num_models' not in columns_to_show:
|
420 |
columns_to_show.append('num_models')
|
421 |
-
# Convert to integer, handling possible non-numeric values
|
422 |
-
filtered_df['num_models'] = pd.to_numeric(filtered_df['num_models'], errors='coerce').fillna(0).astype(
|
423 |
-
int)
|
424 |
filtered_df = filtered_df[filtered_df['num_models'] != 0]
|
425 |
|
426 |
if "spaces" in hf_options:
|
427 |
if 'num_spaces' not in columns_to_show:
|
428 |
columns_to_show.append('num_spaces')
|
429 |
-
# Convert to integer, handling possible non-numeric values
|
430 |
-
filtered_df['num_spaces'] = pd.to_numeric(filtered_df['num_spaces'], errors='coerce').fillna(0).astype(
|
431 |
-
int)
|
432 |
filtered_df = filtered_df[filtered_df['num_spaces'] != 0]
|
433 |
|
434 |
if "github" in hf_options:
|
|
|
23 |
"""
|
24 |
|
25 |
CONFERENCES_ICONS = {
|
26 |
+
"NeurIPS2024": NEURIPS_ICO,
|
27 |
"EMNLP2024": 'https://aclanthology.org/aclicon.ico',
|
28 |
"CoRL2024": CORL_ICO,
|
29 |
"ACMMM2024": "https://2024.acmmm.org/favicon.ico",
|
|
|
393 |
|
394 |
# Handle Hugging Face options
|
395 |
if hf_options:
|
396 |
+
# Convert columns to numeric, handling non-numeric values
|
397 |
+
filtered_df['num_datasets'] = pd.to_numeric(filtered_df['num_datasets'], errors='coerce').fillna(0).astype(
|
398 |
+
int)
|
399 |
+
filtered_df['num_models'] = pd.to_numeric(filtered_df['num_models'], errors='coerce').fillna(0).astype(int)
|
400 |
+
filtered_df['num_spaces'] = pd.to_numeric(filtered_df['num_spaces'], errors='coerce').fillna(0).astype(int)
|
401 |
+
|
402 |
if "🤗 artifacts" in hf_options:
|
403 |
filtered_df = filtered_df[
|
404 |
(filtered_df['paper_page'] != "") & (filtered_df['paper_page'].notna())
|
|
|
414 |
if 'num_spaces' not in columns_to_show:
|
415 |
columns_to_show.append('num_spaces')
|
416 |
|
417 |
+
filtered_df = filtered_df[
|
418 |
+
(filtered_df['num_datasets'] > 0) |
|
419 |
+
(filtered_df['num_models'] > 0) |
|
420 |
+
(filtered_df['num_spaces'] > 0)
|
421 |
+
]
|
422 |
+
|
423 |
if "datasets" in hf_options:
|
424 |
if 'num_datasets' not in columns_to_show:
|
425 |
columns_to_show.append('num_datasets')
|
|
|
|
|
|
|
426 |
filtered_df = filtered_df[filtered_df['num_datasets'] != 0]
|
427 |
|
428 |
if "models" in hf_options:
|
429 |
if 'num_models' not in columns_to_show:
|
430 |
columns_to_show.append('num_models')
|
|
|
|
|
|
|
431 |
filtered_df = filtered_df[filtered_df['num_models'] != 0]
|
432 |
|
433 |
if "spaces" in hf_options:
|
434 |
if 'num_spaces' not in columns_to_show:
|
435 |
columns_to_show.append('num_spaces')
|
|
|
|
|
|
|
436 |
filtered_df = filtered_df[filtered_df['num_spaces'] != 0]
|
437 |
|
438 |
if "github" in hf_options:
|