chansung commited on
Commit
a95339f
β€’
1 Parent(s): ca3e112

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +23 -6
app.py CHANGED
@@ -133,12 +133,6 @@ with gr.Blocks(css=STYLE) as demo:
133
  interactive=True
134
  )
135
 
136
- date_dd.input(
137
- get_papers,
138
- date_dd,
139
- papers_dd
140
- )
141
-
142
  title = gr.Markdown(f"# {selected_paper['title']}")
143
  summary = gr.Markdown(f"{selected_paper['summary']}", elem_classes=["small-font"])
144
 
@@ -192,6 +186,29 @@ with gr.Blocks(css=STYLE) as demo:
192
  breath_q_eli5_2 = gr.Markdown(f"β†ͺ **(ELI5)** {selected_paper['2_additional_breath_q:answers:eli5']}", elem_classes=["small-font"])
193
  breath_q_expert_2 = gr.Markdown(f"β†ͺ **(Technical)** {selected_paper['2_additional_breath_q:answers:expert']}", elem_classes=["small-font"])
194
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
195
  papers_dd.input(
196
  set_paper,
197
  [date_dd, papers_dd],
 
133
  interactive=True
134
  )
135
 
 
 
 
 
 
 
136
  title = gr.Markdown(f"# {selected_paper['title']}")
137
  summary = gr.Markdown(f"{selected_paper['summary']}", elem_classes=["small-font"])
138
 
 
186
  breath_q_eli5_2 = gr.Markdown(f"β†ͺ **(ELI5)** {selected_paper['2_additional_breath_q:answers:eli5']}", elem_classes=["small-font"])
187
  breath_q_expert_2 = gr.Markdown(f"β†ͺ **(Technical)** {selected_paper['2_additional_breath_q:answers:expert']}", elem_classes=["small-font"])
188
 
189
+ date_dd.input(
190
+ get_papers,
191
+ date_dd,
192
+ papers_dd
193
+ ).then(
194
+ set_paper,
195
+ [date_dd, papers_dd],
196
+ [
197
+ title, summary,
198
+ basic_q_0, basic_q_eli5_0, basic_q_expert_0,
199
+ depth_q_0, depth_q_eli5_0, depth_q_expert_0,
200
+ breath_q_0, breath_q_eli5_0, breath_q_expert_0,
201
+
202
+ basic_q_1, basic_q_eli5_1, basic_q_expert_1,
203
+ depth_q_1, depth_q_eli5_1, depth_q_expert_1,
204
+ breath_q_1, breath_q_eli5_1, breath_q_expert_1,
205
+
206
+ basic_q_2, basic_q_eli5_2, basic_q_expert_2,
207
+ depth_q_2, depth_q_eli5_2, depth_q_expert_2,
208
+ breath_q_2, breath_q_eli5_2, breath_q_expert_2
209
+ ]
210
+ )
211
+
212
  papers_dd.input(
213
  set_paper,
214
  [date_dd, papers_dd],