vermen commited on
Commit
3e20130
·
verified ·
1 Parent(s): b7f2820

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -57,16 +57,16 @@ def upload_file(filepath):
57
  doc = fitz.open(filepath)
58
  create_excel(doc,excel_name)
59
  # now create the excel file
60
- return [gr.UploadButton(visible=False), gr.DownloadButton(label=f"Download {excel_name}", value=excel_name, visible=True)]
61
 
62
  def download_file():
63
  return [gr.UploadButton(visible=True), gr.DownloadButton(visible=False)]
64
 
65
  with gr.Blocks() as demo:
66
- gr.Markdown("First upload a file and and then you'll be able download it (but only once!)")
67
  with gr.Row():
68
- u = gr.UploadButton("Upload a file", file_count="single")
69
- d = gr.DownloadButton("Download the file", visible=False)
70
 
71
  u.upload(upload_file, u, [u, d])
72
  d.click(download_file, None, [u, d])
 
57
  doc = fitz.open(filepath)
58
  create_excel(doc,excel_name)
59
  # now create the excel file
60
+ return [gr.UploadButton(visible=False), gr.DownloadButton(label=f"Descarga {excel_name}", value=excel_name, visible=True)]
61
 
62
  def download_file():
63
  return [gr.UploadButton(visible=True), gr.DownloadButton(visible=False)]
64
 
65
  with gr.Blocks() as demo:
66
+ gr.Markdown("Primero sube tu archive pdf luego podrás descargar un archivo Excel (Sube un archivo por vez!)")
67
  with gr.Row():
68
+ u = gr.UploadButton("Sube tu PDF", file_count="single")
69
+ d = gr.DownloadButton("Descarga tu Excel", visible=False)
70
 
71
  u.upload(upload_file, u, [u, d])
72
  d.click(download_file, None, [u, d])