x
This commit is contained in:
@@ -207,7 +207,7 @@ def create_ui():
|
||||
|
||||
with gr.Row():
|
||||
with gr.Column(scale=1):
|
||||
file_input = gr.File(
|
||||
file_input = gr.UploadButton(
|
||||
label="Upload PDF",
|
||||
file_types=[".pdf"],
|
||||
type="binary",
|
||||
@@ -242,11 +242,16 @@ def create_ui():
|
||||
elem_classes=["result-panel"],
|
||||
)
|
||||
|
||||
submit_btn.click(
|
||||
file_input.upload(
|
||||
fn=process_pdf,
|
||||
inputs=[file_input, backend_dd, lang_dd],
|
||||
outputs=[result_display, status_display, zip_display],
|
||||
)
|
||||
submit_btn.click(
|
||||
fn=lambda f,b,l: "Please use the Upload button above.",
|
||||
inputs=[file_input, backend_dd, lang_dd],
|
||||
outputs=[result_display, status_display, zip_display],
|
||||
)
|
||||
|
||||
return demo
|
||||
|
||||
|
||||
Reference in New Issue
Block a user