Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Update app.py
Browse files
app.py
CHANGED
@@ -362,8 +362,13 @@ 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 |
-
|
366 |
-
|
|
|
|
|
|
|
|
|
|
|
367 |
|
368 |
def set_papers(y, m, d, title):
|
369 |
papers = [paper["title"] for paper in date_dict[y][m][d]]
|
|
|
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 |
+
for paper in papers:
|
366 |
+
if paper['title'] == title:
|
367 |
+
return (
|
368 |
+
gr.Dropdown(value=year),
|
369 |
+
gr.Dropdown(choices=sorted(months), value=month),
|
370 |
+
gr.Dropdown(choices=sorted(days), value=day),
|
371 |
+
)
|
372 |
|
373 |
def set_papers(y, m, d, title):
|
374 |
papers = [paper["title"] for paper in date_dict[y][m][d]]
|