EasySci commited on
Commit
f46cae5
·
1 Parent(s): 5684300

Update app2.py

Browse files
Files changed (1) hide show
  1. app2.py +14 -13
app2.py CHANGED
@@ -41,19 +41,19 @@ def run_code(event):
41
  print("Inside function:", buttons_to_add, category, flush = True)
42
  query = category
43
  search = Search_Papers(query, search_mode, timeframe_today, sort_by, sort_order)
44
- # result_arxiv = search.search_arxiv()
45
- result_general = search.search_general()
46
 
47
 
48
- for test in result_general:
49
- try:
50
- print(test['title'], flush = True)
51
- print(test['subject'], flush = True)
52
- print(test, flush = True)
53
 
54
 
55
- except:
56
- print(test['abstract'], flush = True)
57
 
58
  return result_general
59
 
@@ -75,14 +75,15 @@ def update_mainTLDR():
75
  for category in buttons_to_add:
76
  print("Used categories:", buttons_to_add, flush=True)
77
  paper_list = run_code(None)
78
-
79
  # Generate a Markdown object for each selected category
80
  markdown = pn.pane.Markdown(f"# {category}")
81
  first_flag = 1
82
  for paper in paper_list:
83
- paper_title = "## " + paper['title'][0]
84
- paper_tldr = "### " + paper['abstract'][0]
85
- paper_date = "### " + paper['created'][0]
 
86
  if first_flag:
87
  content = pn.Row(
88
  markdown,
 
41
  print("Inside function:", buttons_to_add, category, flush = True)
42
  query = category
43
  search = Search_Papers(query, search_mode, timeframe_today, sort_by, sort_order)
44
+ result_arxiv = search.search_arxiv()
45
+ # result_general = search.search_general()
46
 
47
 
48
+ # for test in result_general:
49
+ # try:
50
+ # print(test['title'], flush = True)
51
+ # print(test['subject'], flush = True)
52
+ # print(test, flush = True)
53
 
54
 
55
+ # except:
56
+ # print(test['abstract'], flush = True)
57
 
58
  return result_general
59
 
 
75
  for category in buttons_to_add:
76
  print("Used categories:", buttons_to_add, flush=True)
77
  paper_list = run_code(None)
78
+ print("This is it!!!!!!: ", paper_list)
79
  # Generate a Markdown object for each selected category
80
  markdown = pn.pane.Markdown(f"# {category}")
81
  first_flag = 1
82
  for paper in paper_list:
83
+ # paper_title = "## " + paper['title'][0]
84
+ # paper_tldr = "### " + paper['abstract'][0]
85
+ # paper_date = "### " + paper['created'][0]
86
+
87
  if first_flag:
88
  content = pn.Row(
89
  markdown,