IAMJB commited on
Commit
5024e8d
·
1 Parent(s): ab663e5
Files changed (2) hide show
  1. app.py +2 -1
  2. df/PaperCentral.py +13 -9
app.py CHANGED
@@ -106,6 +106,7 @@ with gr.Blocks(css="style.css") as demo:
106
  cat_options = gr.CheckboxGroup(
107
  label="Category",
108
  choices=[
 
109
  'cs.*',
110
  'eess.*',
111
  'econ.*',
@@ -127,7 +128,7 @@ with gr.Blocks(css="style.css") as demo:
127
  'q-fin.*',
128
  'stat.*',
129
  ],
130
- value=["cs.*"]
131
  )
132
  hf_options = gr.CheckboxGroup(
133
  label="Hugging Face options",
 
106
  cat_options = gr.CheckboxGroup(
107
  label="Category",
108
  choices=[
109
+ '(ALL)',
110
  'cs.*',
111
  'eess.*',
112
  'econ.*',
 
128
  'q-fin.*',
129
  'stat.*',
130
  ],
131
+ value=["(ALL)"]
132
  )
133
  hf_options = gr.CheckboxGroup(
134
  label="Hugging Face options",
df/PaperCentral.py CHANGED
@@ -268,7 +268,6 @@ class PaperCentral:
268
  f"<a href='{row['project_page']}'>{row['project_page']}</a>"
269
  )
270
 
271
-
272
  return row
273
 
274
  df = df.copy()
@@ -346,14 +345,19 @@ class PaperCentral:
346
 
347
  # Handle category options
348
  if cat_options:
349
- options = [o.replace(".*", "") for o in cat_options]
350
- conference_filter = pd.Series(False, index=filtered_df.index)
351
- for option in options:
352
- conference_filter |= (
353
- filtered_df['primary_category'].notna() &
354
- filtered_df['primary_category'].str.contains(option, case=False)
355
- )
356
- filtered_df = filtered_df[conference_filter]
 
 
 
 
 
357
 
358
  # Handle date filtering
359
  if not conference_options:
 
268
  f"<a href='{row['project_page']}'>{row['project_page']}</a>"
269
  )
270
 
 
271
  return row
272
 
273
  df = df.copy()
 
345
 
346
  # Handle category options
347
  if cat_options:
348
+ if "(ALL)" in cat_options:
349
+ # If "(ALL)" is selected, include all categories without filtering
350
+ pass # No action needed, include all categories
351
+ else:
352
+ # Proceed with filtering based on selected categories
353
+ options = [o.replace(".*", "") for o in cat_options]
354
+ conference_filter = pd.Series(False, index=filtered_df.index)
355
+ for option in options:
356
+ conference_filter |= (
357
+ filtered_df['primary_category'].notna() &
358
+ filtered_df['primary_category'].str.contains(option, case=False)
359
+ )
360
+ filtered_df = filtered_df[conference_filter]
361
 
362
  # Handle date filtering
363
  if not conference_options: