Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -130,9 +130,10 @@ def convert(pdf_bytes):
|
|
130 |
|
131 |
return markdown_output.strip(), image_paths, markdown_path
|
132 |
|
|
|
133 |
with gr.Blocks() as demo:
|
134 |
with gr.Row():
|
135 |
-
pdf_input = gr.File(label="Sube tu PDF", type="
|
136 |
submit_btn = gr.Button("Procesar PDF")
|
137 |
|
138 |
markdown_output = gr.Textbox(label="Markdown estructurado", lines=25, interactive=True)
|
@@ -141,4 +142,5 @@ with gr.Blocks() as demo:
|
|
141 |
|
142 |
submit_btn.click(fn=convert, inputs=[pdf_input], outputs=[markdown_output, gallery_output, download_md])
|
143 |
|
144 |
-
demo.
|
|
|
|
130 |
|
131 |
return markdown_output.strip(), image_paths, markdown_path
|
132 |
|
133 |
+
# Interfaz Gradio
|
134 |
with gr.Blocks() as demo:
|
135 |
with gr.Row():
|
136 |
+
pdf_input = gr.File(label="Sube tu PDF", type="filepath")
|
137 |
submit_btn = gr.Button("Procesar PDF")
|
138 |
|
139 |
markdown_output = gr.Textbox(label="Markdown estructurado", lines=25, interactive=True)
|
|
|
142 |
|
143 |
submit_btn.click(fn=convert, inputs=[pdf_input], outputs=[markdown_output, gallery_output, download_md])
|
144 |
|
145 |
+
demo.queue()
|
146 |
+
demo.launch()
|