Svngoku commited on
Commit
ef7763d
·
verified ·
1 Parent(s): ad2f309

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -194,7 +194,9 @@ def create_interface():
194
  else: # gr.File
195
  inputs = input_type(label=label, file_types=file_types)
196
  output = gr.Markdown(label="Result")
197
- gr.Button(f"Process {name.split(' with ')[1]}").click(fn, inputs=inputs, outputs=output)
 
 
198
 
199
  with gr.Tab("Document Understanding"):
200
  doc_url = gr.Textbox(label="Document URL", placeholder="e.g., https://arxiv.org/pdf/1805.04770")
 
194
  else: # gr.File
195
  inputs = input_type(label=label, file_types=file_types)
196
  output = gr.Markdown(label="Result")
197
+ # Use a more reliable way to get the button label
198
+ button_label = name.replace("OCR with ", "").replace("Structured ", "Get Structured ")
199
+ gr.Button(f"Process {button_label}").click(fn, inputs=inputs, outputs=output)
200
 
201
  with gr.Tab("Document Understanding"):
202
  doc_url = gr.Textbox(label="Document URL", placeholder="e.g., https://arxiv.org/pdf/1805.04770")