Spaces:
Running
Running
format
Browse filesSigned-off-by: peter szemraj <[email protected]>
app.py
CHANGED
|
@@ -114,13 +114,15 @@ if __name__ == "__main__":
|
|
| 114 |
with demo:
|
| 115 |
|
| 116 |
gr.Markdown("# PDF to Text")
|
| 117 |
-
gr.Markdown("
|
| 118 |
-
gr.Markdown("
|
| 119 |
|
| 120 |
with gr.Column():
|
| 121 |
|
| 122 |
gr.Markdown("## Load Inputs")
|
| 123 |
gr.Markdown("Upload your own file:")
|
|
|
|
|
|
|
| 124 |
pdf_obj = gr.Textbox(
|
| 125 |
lines=1,
|
| 126 |
label="VM file path",
|
|
@@ -132,6 +134,7 @@ if __name__ == "__main__":
|
|
| 132 |
label="Upload a PDF file",
|
| 133 |
file_count="single",
|
| 134 |
type="file",
|
|
|
|
| 135 |
)
|
| 136 |
load_file_button = gr.Button("Load Uploaded File")
|
| 137 |
|
|
|
|
| 114 |
with demo:
|
| 115 |
|
| 116 |
gr.Markdown("# PDF to Text")
|
| 117 |
+
gr.Markdown("A basic demo of pdf-to-text conversion using OCR from the [doctr](https://mindee.github.io/doctr/index.html) package")
|
| 118 |
+
gr.Markdown("---")
|
| 119 |
|
| 120 |
with gr.Column():
|
| 121 |
|
| 122 |
gr.Markdown("## Load Inputs")
|
| 123 |
gr.Markdown("Upload your own file:")
|
| 124 |
+
gr.Markdown("_If no file is uploaded, a sample PDF will be used_")
|
| 125 |
+
|
| 126 |
pdf_obj = gr.Textbox(
|
| 127 |
lines=1,
|
| 128 |
label="VM file path",
|
|
|
|
| 134 |
label="Upload a PDF file",
|
| 135 |
file_count="single",
|
| 136 |
type="file",
|
| 137 |
+
value= _here / "example_file.pdf",
|
| 138 |
)
|
| 139 |
load_file_button = gr.Button("Load Uploaded File")
|
| 140 |
|