chansung commited on
Commit
9381962
β€’
1 Parent(s): 16ca275

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -359,9 +359,11 @@ def search(search_in, max_results=3):
359
  )
360
 
361
  def set_date(title):
362
- paper = title2qna[title]
363
- year, month, day = paper["target_date"].strftime("%Y-%m-%d").split("-")
364
- return year, month, day
 
 
365
 
366
  def set_papers(y, m, d, title):
367
  papers = [paper["title"] for paper in date_dict[y][m][d]]
 
359
  )
360
 
361
  def set_date(title):
362
+ for _, (year, months) in enumerate(date_dict.items()):
363
+ for _, (month, days) in enumerate(months.items()):
364
+ for _, (day, papers) in enumerate(days.items()):
365
+ if title in papers:
366
+ return year, month, day
367
 
368
  def set_papers(y, m, d, title):
369
  papers = [paper["title"] for paper in date_dict[y][m][d]]