Commit
·
45edcec
1
Parent(s):
d46183f
fixes
Browse files
app.py
CHANGED
@@ -100,7 +100,10 @@ def create_markdown_summary(categories=None, new_only=True, narrow_categories=No
|
|
100 |
df = df[df["prediction"] == "new_dataset"]
|
101 |
if narrow_categories is not None:
|
102 |
df = df[df["category"].isin(narrow_categories)]
|
103 |
-
if categories is not None
|
|
|
|
|
|
|
104 |
df = df[df["broad_category"].isin(categories)]
|
105 |
number_of_results = len(df)
|
106 |
results = (
|
@@ -135,7 +138,6 @@ with gr.Blocks() as demo:
|
|
135 |
label="Broad arXiv Category",
|
136 |
multiselect=True,
|
137 |
value="cs",
|
138 |
-
size="sm",
|
139 |
)
|
140 |
with gr.Accordion("Advanced Options", open=False):
|
141 |
gr.Markdown(
|
@@ -150,7 +152,7 @@ with gr.Blocks() as demo:
|
|
150 |
)
|
151 |
gr.ClearButton(narrow_categories, "Clear Narrow Categories", size="sm")
|
152 |
with gr.Row():
|
153 |
-
new_only = gr.Checkbox(True, label="New Datasets Only",
|
154 |
results = gr.Markdown(create_markdown_summary())
|
155 |
broad_categories.change(
|
156 |
create_markdown_summary,
|
|
|
100 |
df = df[df["prediction"] == "new_dataset"]
|
101 |
if narrow_categories is not None:
|
102 |
df = df[df["category"].isin(narrow_categories)]
|
103 |
+
if categories is not None:
|
104 |
+
df = prepare_data()
|
105 |
+
if new_only:
|
106 |
+
df = df[df["prediction"] == "new_dataset"]
|
107 |
df = df[df["broad_category"].isin(categories)]
|
108 |
number_of_results = len(df)
|
109 |
results = (
|
|
|
138 |
label="Broad arXiv Category",
|
139 |
multiselect=True,
|
140 |
value="cs",
|
|
|
141 |
)
|
142 |
with gr.Accordion("Advanced Options", open=False):
|
143 |
gr.Markdown(
|
|
|
152 |
)
|
153 |
gr.ClearButton(narrow_categories, "Clear Narrow Categories", size="sm")
|
154 |
with gr.Row():
|
155 |
+
new_only = gr.Checkbox(True, label="New Datasets Only", interactive=True)
|
156 |
results = gr.Markdown(create_markdown_summary())
|
157 |
broad_categories.change(
|
158 |
create_markdown_summary,
|