Update app.py
Browse files
app.py
CHANGED
|
@@ -33,10 +33,10 @@ def process(pdf_file):
|
|
| 33 |
|
| 34 |
with gr.Blocks() as demo:
|
| 35 |
gr.Markdown("## 📚 Law PDF Formatter")
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
btn.click(fn=process, inputs=file, outputs=out)
|
| 41 |
|
| 42 |
-
demo.launch()
|
|
|
|
| 33 |
|
| 34 |
with gr.Blocks() as demo:
|
| 35 |
gr.Markdown("## 📚 Law PDF Formatter")
|
| 36 |
+
with gr.Row():
|
| 37 |
+
file = gr.File(file_types=[".pdf"], label="Upload PDF", type="filepath")
|
| 38 |
+
btn = gr.Button("Extract Text")
|
| 39 |
+
out = gr.Textbox(label="Extracted Text", lines=20, interactive=True)
|
| 40 |
btn.click(fn=process, inputs=file, outputs=out)
|
| 41 |
|
| 42 |
+
demo.launch(share=True, flagging_callback=None)
|