Spaces:
Running
Running
Update app2.py
Browse files
app2.py
CHANGED
|
@@ -30,8 +30,10 @@ def load_categories():
|
|
| 30 |
data = f.read()
|
| 31 |
# reconstructing the data as a dictionary
|
| 32 |
category_dict = json.loads(data)
|
| 33 |
-
|
| 34 |
-
|
|
|
|
|
|
|
| 35 |
|
| 36 |
def run_code(event):
|
| 37 |
categories = buttons_to_add
|
|
@@ -44,7 +46,7 @@ def run_code(event):
|
|
| 44 |
sort_by = "PublishDate" #Accepted values: 'PublishDate', 'LastUpdatedDate' and 'Relevance'
|
| 45 |
sort_order = "Descending" #Accepted values: 'Ascending' and 'Descending'
|
| 46 |
|
| 47 |
-
for category in
|
| 48 |
|
| 49 |
print("Inside function:", buttons_to_add, category, flush = True)
|
| 50 |
query = category
|
|
@@ -163,7 +165,10 @@ text = pn.pane.Markdown(instructions)
|
|
| 163 |
text2 = pn.pane.Markdown(instructions2)
|
| 164 |
|
| 165 |
# List to store the entered options
|
| 166 |
-
|
|
|
|
|
|
|
|
|
|
| 167 |
|
| 168 |
# Create buttons for the header
|
| 169 |
header_buttons = pn.Row(sizing_mode='stretch_width', css_classes=['header-buttons'])
|
|
|
|
| 30 |
data = f.read()
|
| 31 |
# reconstructing the data as a dictionary
|
| 32 |
category_dict = json.loads(data)
|
| 33 |
+
list_categories_tags = list(category_dict.keys())
|
| 34 |
+
list_categories_names = list(category_dict.values())
|
| 35 |
+
|
| 36 |
+
return [list_categories_tags, list_categories_names]
|
| 37 |
|
| 38 |
def run_code(event):
|
| 39 |
categories = buttons_to_add
|
|
|
|
| 46 |
sort_by = "PublishDate" #Accepted values: 'PublishDate', 'LastUpdatedDate' and 'Relevance'
|
| 47 |
sort_order = "Descending" #Accepted values: 'Ascending' and 'Descending'
|
| 48 |
|
| 49 |
+
for category in arxiv_tags:
|
| 50 |
|
| 51 |
print("Inside function:", buttons_to_add, category, flush = True)
|
| 52 |
query = category
|
|
|
|
| 165 |
text2 = pn.pane.Markdown(instructions2)
|
| 166 |
|
| 167 |
# List to store the entered options
|
| 168 |
+
loaded_list = load_categories()
|
| 169 |
+
|
| 170 |
+
arxiv_tags = loaded_list[0]
|
| 171 |
+
entered_options = loaded_list[1]
|
| 172 |
|
| 173 |
# Create buttons for the header
|
| 174 |
header_buttons = pn.Row(sizing_mode='stretch_width', css_classes=['header-buttons'])
|