Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -150,17 +150,18 @@ def convert(pdf_bytes):
|
|
150 |
|
151 |
return markdown_output.strip(), image_paths, markdown_path
|
152 |
|
153 |
-
#
|
154 |
with gr.Blocks() as demo:
|
155 |
with gr.Row():
|
156 |
-
pdf_input = gr.File(label="
|
157 |
-
submit_btn = gr.Button("
|
158 |
|
159 |
-
markdown_output = gr.Textbox(label="Markdown
|
160 |
-
gallery_output = gr.Gallery(label="
|
161 |
-
download_md = gr.File(label="
|
162 |
|
163 |
submit_btn.click(fn=convert, inputs=[pdf_input], outputs=[markdown_output, gallery_output, download_md])
|
164 |
|
165 |
demo.queue()
|
166 |
demo.launch()
|
|
|
|
150 |
|
151 |
return markdown_output.strip(), image_paths, markdown_path
|
152 |
|
153 |
+
# Gradio Interface (English version)
|
154 |
with gr.Blocks() as demo:
|
155 |
with gr.Row():
|
156 |
+
pdf_input = gr.File(label="Upload your PDF", type="filepath")
|
157 |
+
submit_btn = gr.Button("Process PDF")
|
158 |
|
159 |
+
markdown_output = gr.Textbox(label="Structured Markdown Output", lines=25, interactive=True)
|
160 |
+
gallery_output = gr.Gallery(label="Extracted Images", type="file")
|
161 |
+
download_md = gr.File(label="Download .md File")
|
162 |
|
163 |
submit_btn.click(fn=convert, inputs=[pdf_input], outputs=[markdown_output, gallery_output, download_md])
|
164 |
|
165 |
demo.queue()
|
166 |
demo.launch()
|
167 |
+
|