Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -113,18 +113,18 @@ with gr.Blocks(css=css) as demo:
|
|
113 |
parsed_output = gr.Markdown(elem_id='mkd', value='Output Text π')
|
114 |
output_file = gr.File(file_types = ["txt"], label="Output File π")
|
115 |
|
116 |
-
btn.click(inference, [pdf_file, pdf_link, file_btn], parsed_output, output_file)
|
117 |
clr.click(lambda : (gr.update(value=None),
|
118 |
gr.update(value=None),
|
119 |
gr.update(value=None),
|
120 |
gr.update(value=None)),
|
121 |
[],
|
122 |
-
[pdf_file, pdf_link, file_btn,
|
123 |
)
|
124 |
gr.Examples(
|
125 |
[["nougat.pdf", "", True], [None, "https://arxiv.org/pdf/2308.08316.pdf", True]],
|
126 |
inputs = [pdf_file, pdf_link],
|
127 |
-
outputs = parsed_output,
|
128 |
fn=inference,
|
129 |
cache_examples=True,
|
130 |
label='Click on any Examples below to get Nougat OCR results quickly:'
|
|
|
113 |
parsed_output = gr.Markdown(elem_id='mkd', value='Output Text π')
|
114 |
output_file = gr.File(file_types = ["txt"], label="Output File π")
|
115 |
|
116 |
+
btn.click(inference, [pdf_file, pdf_link, file_btn], [parsed_output, output_file])
|
117 |
clr.click(lambda : (gr.update(value=None),
|
118 |
gr.update(value=None),
|
119 |
gr.update(value=None),
|
120 |
gr.update(value=None)),
|
121 |
[],
|
122 |
+
[pdf_file, pdf_link, file_btn, parsed_output, output_file]
|
123 |
)
|
124 |
gr.Examples(
|
125 |
[["nougat.pdf", "", True], [None, "https://arxiv.org/pdf/2308.08316.pdf", True]],
|
126 |
inputs = [pdf_file, pdf_link],
|
127 |
+
outputs = [parsed_output, output_file],
|
128 |
fn=inference,
|
129 |
cache_examples=True,
|
130 |
label='Click on any Examples below to get Nougat OCR results quickly:'
|