Biifruu commited on
Commit
2f1a912
verified
1 Parent(s): 86d7cbb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -131,19 +131,19 @@ def convert(pdf_file):
131
 
132
  return markdown_output.strip(), image_paths, markdown_path
133
 
134
- # Interfaz compatible con Gradio 3.x
135
  with gr.Blocks() as demo:
136
  with gr.Row():
137
  pdf_input = gr.File(label="Sube tu PDF", type="filepath")
138
  submit_btn = gr.Button("Procesar PDF")
139
 
 
 
 
140
  markdown_output = gr.Textbox(label="Markdown estructurado", lines=25, interactive=True)
141
  gallery_output = gr.Gallery(label="Im谩genes extra铆das", type="file")
142
  download_md = gr.File(label="Descargar .md")
143
 
144
  submit_btn.click(fn=convert, inputs=[pdf_input], outputs=[markdown_output, gallery_output, download_md])
145
 
146
- # Recargar app (link HTML)
147
- gr.HTML('<a href="" style="display:inline-block;padding:0.5em 1em;background:#eee;border-radius:4px;text-decoration:none;">馃攧 Refrescar app</a>')
148
-
149
  demo.launch()
 
131
 
132
  return markdown_output.strip(), image_paths, markdown_path
133
 
134
+ # Interfaz Gradio compatible
135
  with gr.Blocks() as demo:
136
  with gr.Row():
137
  pdf_input = gr.File(label="Sube tu PDF", type="filepath")
138
  submit_btn = gr.Button("Procesar PDF")
139
 
140
+ # 馃攧 Bot贸n refrescar (como enlace HTML, debajo del bot贸n principal)
141
+ gr.HTML('<div style="margin-top: -1em; margin-bottom: 1em;"><a href="" style="display:inline-block;padding:0.5em 1em;background:#eee;border-radius:4px;text-decoration:none;font-weight:bold;">馃攧 Refrescar app</a></div>')
142
+
143
  markdown_output = gr.Textbox(label="Markdown estructurado", lines=25, interactive=True)
144
  gallery_output = gr.Gallery(label="Im谩genes extra铆das", type="file")
145
  download_md = gr.File(label="Descargar .md")
146
 
147
  submit_btn.click(fn=convert, inputs=[pdf_input], outputs=[markdown_output, gallery_output, download_md])
148
 
 
 
 
149
  demo.launch()