Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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"
|
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("
|
67 |
with gr.Row():
|
68 |
-
u = gr.UploadButton("
|
69 |
-
d = gr.DownloadButton("
|
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])
|