Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Update app.py
Browse files
app.py
CHANGED
@@ -168,7 +168,7 @@ with gr.Blocks(css=STYLE, theme=gr.themes.Soft()) as demo:
|
|
168 |
add_arxiv_ids_to_queue,
|
169 |
[arxiv_queue, arxiv_id_enter],
|
170 |
[arxiv_queue, arxiv_id_enter],
|
171 |
-
concurrency_limit=
|
172 |
)
|
173 |
|
174 |
|
@@ -181,70 +181,70 @@ with gr.Blocks(css=STYLE, theme=gr.themes.Soft()) as demo:
|
|
181 |
set_papers,
|
182 |
inputs=[year_dd, month_dd, day_dd, search_r1],
|
183 |
outputs=[cur_arxiv_id, papers_dd, search_in],
|
184 |
-
concurrency_limit=
|
185 |
)
|
186 |
|
187 |
search_r2.click(set_date, search_r2, [year_dd, month_dd, day_dd]).then(
|
188 |
set_papers,
|
189 |
inputs=[year_dd, month_dd, day_dd, search_r2],
|
190 |
outputs=[cur_arxiv_id, papers_dd, search_in],
|
191 |
-
concurrency_limit=
|
192 |
)
|
193 |
|
194 |
search_r3.click(set_date, search_r3, [year_dd, month_dd, day_dd]).then(
|
195 |
set_papers,
|
196 |
inputs=[year_dd, month_dd, day_dd, search_r3],
|
197 |
outputs=[cur_arxiv_id, papers_dd, search_in],
|
198 |
-
concurrency_limit=
|
199 |
)
|
200 |
|
201 |
search_r4.click(set_date, search_r4, [year_dd, month_dd, day_dd]).then(
|
202 |
set_papers,
|
203 |
inputs=[year_dd, month_dd, day_dd, search_r4],
|
204 |
outputs=[cur_arxiv_id, papers_dd, search_in],
|
205 |
-
concurrency_limit=
|
206 |
)
|
207 |
|
208 |
search_r5.click(set_date, search_r5, [year_dd, month_dd, day_dd]).then(
|
209 |
set_papers,
|
210 |
inputs=[year_dd, month_dd, day_dd, search_r5],
|
211 |
outputs=[cur_arxiv_id, papers_dd, search_in],
|
212 |
-
concurrency_limit=
|
213 |
)
|
214 |
|
215 |
search_r6.click(set_date, search_r6, [year_dd, month_dd, day_dd]).then(
|
216 |
set_papers,
|
217 |
inputs=[year_dd, month_dd, day_dd, search_r6],
|
218 |
outputs=[cur_arxiv_id, papers_dd, search_in],
|
219 |
-
concurrency_limit=
|
220 |
)
|
221 |
|
222 |
search_r7.click(set_date, search_r7, [year_dd, month_dd, day_dd]).then(
|
223 |
set_papers,
|
224 |
inputs=[year_dd, month_dd, day_dd, search_r7],
|
225 |
outputs=[cur_arxiv_id, papers_dd, search_in],
|
226 |
-
concurrency_limit=
|
227 |
)
|
228 |
|
229 |
search_r8.click(set_date, search_r8, [year_dd, month_dd, day_dd]).then(
|
230 |
set_papers,
|
231 |
inputs=[year_dd, month_dd, day_dd, search_r8],
|
232 |
outputs=[cur_arxiv_id, papers_dd, search_in],
|
233 |
-
concurrency_limit=
|
234 |
)
|
235 |
|
236 |
search_r9.click(set_date, search_r9, [year_dd, month_dd, day_dd]).then(
|
237 |
set_papers,
|
238 |
inputs=[year_dd, month_dd, day_dd, search_r9],
|
239 |
outputs=[cur_arxiv_id, papers_dd, search_in],
|
240 |
-
concurrency_limit=
|
241 |
)
|
242 |
|
243 |
search_r10.click(set_date, search_r10, [year_dd, month_dd, day_dd]).then(
|
244 |
set_papers,
|
245 |
inputs=[year_dd, month_dd, day_dd, search_r10],
|
246 |
outputs=[cur_arxiv_id, papers_dd, search_in],
|
247 |
-
concurrency_limit=
|
248 |
)
|
249 |
|
250 |
year_dd.input(get_paper_by_year, inputs=[year_dd], outputs=[month_dd, day_dd, papers_dd]).then(
|
@@ -264,7 +264,7 @@ with gr.Blocks(css=STYLE, theme=gr.themes.Soft()) as demo:
|
|
264 |
depth_q_2, depth_q_eli5_2, depth_q_expert_2,
|
265 |
breath_q_2, breath_q_eli5_2, breath_q_expert_2
|
266 |
],
|
267 |
-
concurrency_limit=
|
268 |
)
|
269 |
|
270 |
month_dd.input(get_paper_by_month, inputs=[year_dd, month_dd], outputs=[day_dd, papers_dd]).then(
|
@@ -284,7 +284,7 @@ with gr.Blocks(css=STYLE, theme=gr.themes.Soft()) as demo:
|
|
284 |
depth_q_2, depth_q_eli5_2, depth_q_expert_2,
|
285 |
breath_q_2, breath_q_eli5_2, breath_q_expert_2
|
286 |
],
|
287 |
-
concurrency_limit=
|
288 |
)
|
289 |
|
290 |
day_dd.input(get_paper_by_day, inputs=[year_dd, month_dd, day_dd], outputs=[papers_dd]).then(
|
@@ -304,7 +304,7 @@ with gr.Blocks(css=STYLE, theme=gr.themes.Soft()) as demo:
|
|
304 |
depth_q_2, depth_q_eli5_2, depth_q_expert_2,
|
305 |
breath_q_2, breath_q_eli5_2, breath_q_expert_2
|
306 |
],
|
307 |
-
concurrency_limit=
|
308 |
)
|
309 |
|
310 |
papers_dd.change(set_paper, [year_dd, month_dd, day_dd, papers_dd],
|
@@ -323,7 +323,7 @@ with gr.Blocks(css=STYLE, theme=gr.themes.Soft()) as demo:
|
|
323 |
depth_q_2, depth_q_eli5_2, depth_q_expert_2,
|
324 |
breath_q_2, breath_q_eli5_2, breath_q_expert_2
|
325 |
],
|
326 |
-
concurrency_limit=
|
327 |
)
|
328 |
|
329 |
search_in.change(
|
@@ -351,12 +351,12 @@ with gr.Blocks(css=STYLE, theme=gr.themes.Soft()) as demo:
|
|
351 |
|
352 |
prompt_txtbox.submit(
|
353 |
before_chat_begin, None, [close, reset, regen],
|
354 |
-
concurrency_limit=
|
355 |
).then(
|
356 |
chat_stream,
|
357 |
[cur_arxiv_id, local_data, prompt_txtbox, chat_state],
|
358 |
[prompt_txtbox, chatbot, local_data, close, reset, regen],
|
359 |
-
concurrency_limit=
|
360 |
).then(
|
361 |
None, [cur_arxiv_id, local_data], None,
|
362 |
js=UPDATE_CHAT_HISTORY
|
@@ -364,12 +364,12 @@ with gr.Blocks(css=STYLE, theme=gr.themes.Soft()) as demo:
|
|
364 |
|
365 |
reset.click(
|
366 |
before_chat_begin, None, [close, reset, regen],
|
367 |
-
concurrency_limit=
|
368 |
).then(
|
369 |
chat_reset,
|
370 |
[local_data, chat_state],
|
371 |
[prompt_txtbox, chatbot, local_data, close, reset, regen],
|
372 |
-
concurrency_limit=
|
373 |
).then(
|
374 |
None, [cur_arxiv_id, local_data], None,
|
375 |
js=UPDATE_CHAT_HISTORY
|
|
|
168 |
add_arxiv_ids_to_queue,
|
169 |
[arxiv_queue, arxiv_id_enter],
|
170 |
[arxiv_queue, arxiv_id_enter],
|
171 |
+
concurrency_limit=20,
|
172 |
)
|
173 |
|
174 |
|
|
|
181 |
set_papers,
|
182 |
inputs=[year_dd, month_dd, day_dd, search_r1],
|
183 |
outputs=[cur_arxiv_id, papers_dd, search_in],
|
184 |
+
concurrency_limit=20,
|
185 |
)
|
186 |
|
187 |
search_r2.click(set_date, search_r2, [year_dd, month_dd, day_dd]).then(
|
188 |
set_papers,
|
189 |
inputs=[year_dd, month_dd, day_dd, search_r2],
|
190 |
outputs=[cur_arxiv_id, papers_dd, search_in],
|
191 |
+
concurrency_limit=20,
|
192 |
)
|
193 |
|
194 |
search_r3.click(set_date, search_r3, [year_dd, month_dd, day_dd]).then(
|
195 |
set_papers,
|
196 |
inputs=[year_dd, month_dd, day_dd, search_r3],
|
197 |
outputs=[cur_arxiv_id, papers_dd, search_in],
|
198 |
+
concurrency_limit=20,
|
199 |
)
|
200 |
|
201 |
search_r4.click(set_date, search_r4, [year_dd, month_dd, day_dd]).then(
|
202 |
set_papers,
|
203 |
inputs=[year_dd, month_dd, day_dd, search_r4],
|
204 |
outputs=[cur_arxiv_id, papers_dd, search_in],
|
205 |
+
concurrency_limit=20,
|
206 |
)
|
207 |
|
208 |
search_r5.click(set_date, search_r5, [year_dd, month_dd, day_dd]).then(
|
209 |
set_papers,
|
210 |
inputs=[year_dd, month_dd, day_dd, search_r5],
|
211 |
outputs=[cur_arxiv_id, papers_dd, search_in],
|
212 |
+
concurrency_limit=20,
|
213 |
)
|
214 |
|
215 |
search_r6.click(set_date, search_r6, [year_dd, month_dd, day_dd]).then(
|
216 |
set_papers,
|
217 |
inputs=[year_dd, month_dd, day_dd, search_r6],
|
218 |
outputs=[cur_arxiv_id, papers_dd, search_in],
|
219 |
+
concurrency_limit=20,
|
220 |
)
|
221 |
|
222 |
search_r7.click(set_date, search_r7, [year_dd, month_dd, day_dd]).then(
|
223 |
set_papers,
|
224 |
inputs=[year_dd, month_dd, day_dd, search_r7],
|
225 |
outputs=[cur_arxiv_id, papers_dd, search_in],
|
226 |
+
concurrency_limit=20,
|
227 |
)
|
228 |
|
229 |
search_r8.click(set_date, search_r8, [year_dd, month_dd, day_dd]).then(
|
230 |
set_papers,
|
231 |
inputs=[year_dd, month_dd, day_dd, search_r8],
|
232 |
outputs=[cur_arxiv_id, papers_dd, search_in],
|
233 |
+
concurrency_limit=20,
|
234 |
)
|
235 |
|
236 |
search_r9.click(set_date, search_r9, [year_dd, month_dd, day_dd]).then(
|
237 |
set_papers,
|
238 |
inputs=[year_dd, month_dd, day_dd, search_r9],
|
239 |
outputs=[cur_arxiv_id, papers_dd, search_in],
|
240 |
+
concurrency_limit=20,
|
241 |
)
|
242 |
|
243 |
search_r10.click(set_date, search_r10, [year_dd, month_dd, day_dd]).then(
|
244 |
set_papers,
|
245 |
inputs=[year_dd, month_dd, day_dd, search_r10],
|
246 |
outputs=[cur_arxiv_id, papers_dd, search_in],
|
247 |
+
concurrency_limit=20,
|
248 |
)
|
249 |
|
250 |
year_dd.input(get_paper_by_year, inputs=[year_dd], outputs=[month_dd, day_dd, papers_dd]).then(
|
|
|
264 |
depth_q_2, depth_q_eli5_2, depth_q_expert_2,
|
265 |
breath_q_2, breath_q_eli5_2, breath_q_expert_2
|
266 |
],
|
267 |
+
concurrency_limit=20,
|
268 |
)
|
269 |
|
270 |
month_dd.input(get_paper_by_month, inputs=[year_dd, month_dd], outputs=[day_dd, papers_dd]).then(
|
|
|
284 |
depth_q_2, depth_q_eli5_2, depth_q_expert_2,
|
285 |
breath_q_2, breath_q_eli5_2, breath_q_expert_2
|
286 |
],
|
287 |
+
concurrency_limit=20,
|
288 |
)
|
289 |
|
290 |
day_dd.input(get_paper_by_day, inputs=[year_dd, month_dd, day_dd], outputs=[papers_dd]).then(
|
|
|
304 |
depth_q_2, depth_q_eli5_2, depth_q_expert_2,
|
305 |
breath_q_2, breath_q_eli5_2, breath_q_expert_2
|
306 |
],
|
307 |
+
concurrency_limit=20,
|
308 |
)
|
309 |
|
310 |
papers_dd.change(set_paper, [year_dd, month_dd, day_dd, papers_dd],
|
|
|
323 |
depth_q_2, depth_q_eli5_2, depth_q_expert_2,
|
324 |
breath_q_2, breath_q_eli5_2, breath_q_expert_2
|
325 |
],
|
326 |
+
concurrency_limit=20,
|
327 |
)
|
328 |
|
329 |
search_in.change(
|
|
|
351 |
|
352 |
prompt_txtbox.submit(
|
353 |
before_chat_begin, None, [close, reset, regen],
|
354 |
+
concurrency_limit=20,
|
355 |
).then(
|
356 |
chat_stream,
|
357 |
[cur_arxiv_id, local_data, prompt_txtbox, chat_state],
|
358 |
[prompt_txtbox, chatbot, local_data, close, reset, regen],
|
359 |
+
concurrency_limit=20,
|
360 |
).then(
|
361 |
None, [cur_arxiv_id, local_data], None,
|
362 |
js=UPDATE_CHAT_HISTORY
|
|
|
364 |
|
365 |
reset.click(
|
366 |
before_chat_begin, None, [close, reset, regen],
|
367 |
+
concurrency_limit=20,
|
368 |
).then(
|
369 |
chat_reset,
|
370 |
[local_data, chat_state],
|
371 |
[prompt_txtbox, chatbot, local_data, close, reset, regen],
|
372 |
+
concurrency_limit=20,
|
373 |
).then(
|
374 |
None, [cur_arxiv_id, local_data], None,
|
375 |
js=UPDATE_CHAT_HISTORY
|