Spaces:
Runtime error
Runtime error
removing unused method
Browse files
app.py
CHANGED
@@ -347,29 +347,6 @@ def change_top_output(top_paper_slider, top_pair_slider, info={}):
|
|
347 |
else:
|
348 |
return
|
349 |
|
350 |
-
def reinit_hl(top_paper_slider, top_pair_slider, *args):
|
351 |
-
args = list(args)
|
352 |
-
base = 3*NUM_PAPERS_SHOW+NUM_PAPERS_SHOW*NUM_PAIRS_SHOW
|
353 |
-
increment = NUM_PAPERS_SHOW*NUM_PAIRS_SHOW
|
354 |
-
text_query = args[base:base+increment]
|
355 |
-
text_candidate = args[base+increment:base+2*increment]
|
356 |
-
hl_query = args[base+2*increment:base+3*increment]
|
357 |
-
hl_candidate = args[base+3*increment:base+4*increment]
|
358 |
-
for i in range(int(top_paper_slider)):
|
359 |
-
for j in range(int(top_pair_slider),NUM_PAIRS_SHOW):
|
360 |
-
hl_query[i*NUM_PAIRS_SHOW+j] = gr.components.Interpretation(text_query[i*NUM_PAIRS_SHOW+j])
|
361 |
-
hl_candidate[i*NUM_PAIRS_SHOW+j] = gr.components.Interpretation(text_candidate[i*NUM_PAIRS_SHOW+j])
|
362 |
-
for i in range(int(top_paper_slider),NUM_PAPERS_SHOW):
|
363 |
-
for j in range(NUM_PAPERS_SHOW):
|
364 |
-
hl_query[i*NUM_PAIRS_SHOW+j] = gr.components.Interpretation(text_query[i*NUM_PAIRS_SHOW+j])
|
365 |
-
hl_candidate[i*NUM_PAIRS_SHOW+j] = gr.components.Interpretation(text_candidate[i*NUM_PAIRS_SHOW+j])
|
366 |
-
|
367 |
-
args[base:base+increment] = text_query
|
368 |
-
args[base+increment:base+2*increment] = text_candidate
|
369 |
-
args[base+2*increment:base+3*increment] = hl_query
|
370 |
-
args[base+3*increment:base+4*increment] = hl_candidate
|
371 |
-
return args
|
372 |
-
|
373 |
with gr.Blocks(css='style.css') as demo:
|
374 |
info = gr.State({}) # cached search results as a State variable shared throughout
|
375 |
|
|
|
347 |
else:
|
348 |
return
|
349 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
350 |
with gr.Blocks(css='style.css') as demo:
|
351 |
info = gr.State({}) # cached search results as a State variable shared throughout
|
352 |
|