pdf-reader / app.py
Omnibus's picture
Update app.py
d599b56
raw
history blame
524 Bytes
import gradio as gr
def scrape(instring):
html_src=(f'''
<div style="text-align:center">
<h4>PDF Viewer</h4>
<iframe src="https://docs.google.com/viewer?url={instring}&embedded=true" frameborder="0" height="1200px" width="100%"></iframe>
</div>''')
return gr.HTML.update(f'''{html_src}''')
with gr.Blocks() as app:
gr.Markdown('''<h1>PDF Viewer''')
inp=gr.Textbox()
go_btn = gr.Button()
outp = gr.HTML()
go_btn.click(scrape,inp,outp)
app.queue(concurrency_count=10).launch()