Spaces:
Running
Running
Update app.py
Browse files
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 |
-
|
|
|
|
|
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")
|