Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -130,15 +130,17 @@ with gr.Blocks() as app:
|
|
| 130 |
with gr.Row():
|
| 131 |
inp=gr.Textbox(label="PDF URL",scale=3)
|
| 132 |
pg_num=gr.Number(label="Page Number",value=1,precision=0,scale=1)
|
| 133 |
-
with gr.
|
| 134 |
go_btn = gr.Button("Load PDF")
|
| 135 |
-
|
| 136 |
-
target_lang = gr.Dropdown(label="PDF Language", choices=list(ocr_id.keys()),value="English")
|
| 137 |
|
| 138 |
-
|
| 139 |
-
|
| 140 |
-
|
| 141 |
-
|
|
|
|
|
|
|
|
|
|
| 142 |
go_btn.click(scrape,inp,outp)
|
| 143 |
sum_btn.click(scrape00,[inp,pg_num,target_lang],[text_out,sum_out])
|
| 144 |
app.queue(concurrency_count=10).launch()
|
|
|
|
| 130 |
with gr.Row():
|
| 131 |
inp=gr.Textbox(label="PDF URL",scale=3)
|
| 132 |
pg_num=gr.Number(label="Page Number",value=1,precision=0,scale=1)
|
| 133 |
+
with gr.Tab("View PDF"):
|
| 134 |
go_btn = gr.Button("Load PDF")
|
| 135 |
+
outp = gr.HTML()
|
|
|
|
| 136 |
|
| 137 |
+
with gr.Tab("Summarize"):
|
| 138 |
+
with gr.Row():
|
| 139 |
+
sum_btn = gr.Button("Summarize")
|
| 140 |
+
target_lang = gr.Dropdown(label="PDF Language", choices=list(ocr_id.keys()),value="English")
|
| 141 |
+
with gr.Row():
|
| 142 |
+
text_out = gr.Textbox()
|
| 143 |
+
sum_out = gr.Textbox()
|
| 144 |
go_btn.click(scrape,inp,outp)
|
| 145 |
sum_btn.click(scrape00,[inp,pg_num,target_lang],[text_out,sum_out])
|
| 146 |
app.queue(concurrency_count=10).launch()
|