Spaces:
Sleeping
Sleeping
| 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() |