Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -59,7 +59,7 @@ def search(q,rn,st):
|
|
| 59 |
<div id=frame{i} class='frame_class'>
|
| 60 |
<div id=close{i} class='x_btn' onclick='closefn({i})'>X</div>
|
| 61 |
<iframe src="https://docs.google.com/viewer?url={c['id'].replace('/abs/','/pdf/')}&embedded=true" frameborder="0" height="1200px" width="100%"></iframe></div>"""
|
| 62 |
-
return
|
| 63 |
def next_show(cur):
|
| 64 |
new=int(cur)+10
|
| 65 |
return gr.update(interactive=True),new
|
|
@@ -88,12 +88,11 @@ with gr.Blocks(css=style,head=head) as b:
|
|
| 88 |
show_html=gr.HTML()
|
| 89 |
next_btn=gr.Button("Next")
|
| 90 |
html_out=gr.HTML()
|
| 91 |
-
json_out=gr.JSON()
|
| 92 |
|
| 93 |
-
hid_start=gr.Number(step=1,value=0,visible=
|
| 94 |
|
| 95 |
-
next_btn.click(next_show,[hid_start],[prev_btn,hid_start]).then(show_num,hid_start,show_html).then(search,[query,num,hid_start],[
|
| 96 |
-
prev_btn.click(prev_show,[hid_start],[prev_btn,hid_start]).then(show_num,hid_start,show_html).then(search,[query,num,hid_start],[
|
| 97 |
|
| 98 |
-
sub.click(search,[query,num,hid_start],[
|
| 99 |
b.launch()
|
|
|
|
| 59 |
<div id=frame{i} class='frame_class'>
|
| 60 |
<div id=close{i} class='x_btn' onclick='closefn({i})'>X</div>
|
| 61 |
<iframe src="https://docs.google.com/viewer?url={c['id'].replace('/abs/','/pdf/')}&embedded=true" frameborder="0" height="1200px" width="100%"></iframe></div>"""
|
| 62 |
+
return html
|
| 63 |
def next_show(cur):
|
| 64 |
new=int(cur)+10
|
| 65 |
return gr.update(interactive=True),new
|
|
|
|
| 88 |
show_html=gr.HTML()
|
| 89 |
next_btn=gr.Button("Next")
|
| 90 |
html_out=gr.HTML()
|
|
|
|
| 91 |
|
| 92 |
+
hid_start=gr.Number(step=1,value=0,visible=False, interactive=False)
|
| 93 |
|
| 94 |
+
next_btn.click(next_show,[hid_start],[prev_btn,hid_start]).then(show_num,hid_start,show_html).then(search,[query,num,hid_start],[html_out])
|
| 95 |
+
prev_btn.click(prev_show,[hid_start],[prev_btn,hid_start]).then(show_num,hid_start,show_html).then(search,[query,num,hid_start],[html_out])
|
| 96 |
|
| 97 |
+
sub.click(search,[query,num,hid_start],[html_out]).then(show_num,hid_start,show_html)
|
| 98 |
b.launch()
|