Spaces:
Running
Running
shriarul5273
commited on
Commit
·
170c286
1
Parent(s):
ebf4c3d
updated pdf to docx
Browse files
app.py
CHANGED
@@ -190,15 +190,16 @@ with gr.Blocks(theme="gstaff/xkcd") as demo:
|
|
190 |
)
|
191 |
|
192 |
with gr.TabItem("PDF to DOCX Converter"):
|
193 |
-
gr.Markdown("
|
194 |
pdf_to_docx_input = gr.File(label="Upload PDF File to Convert to DOCX", file_types=[".pdf"], file_count="single")
|
|
|
195 |
docx_result = gr.File(label="Download DOCX")
|
196 |
|
197 |
-
def
|
198 |
return pdf_to_docx(pdf_file)
|
199 |
|
200 |
-
|
201 |
-
|
202 |
inputs=[pdf_to_docx_input],
|
203 |
outputs=[docx_result]
|
204 |
)
|
|
|
190 |
)
|
191 |
|
192 |
with gr.TabItem("PDF to DOCX Converter"):
|
193 |
+
gr.Markdown("Some PDF files may not be converted properly due to the complexity of the PDF file")
|
194 |
pdf_to_docx_input = gr.File(label="Upload PDF File to Convert to DOCX", file_types=[".pdf"], file_count="single")
|
195 |
+
convert_button = gr.Button("Convert to DOCX")
|
196 |
docx_result = gr.File(label="Download DOCX")
|
197 |
|
198 |
+
def convert_pdf_to_docx_with_button(pdf_file):
|
199 |
return pdf_to_docx(pdf_file)
|
200 |
|
201 |
+
convert_button.click(
|
202 |
+
convert_pdf_to_docx_with_button,
|
203 |
inputs=[pdf_to_docx_input],
|
204 |
outputs=[docx_result]
|
205 |
)
|