merve HF staff commited on
Commit
228599b
β€’
1 Parent(s): aa52b57

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
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, output_file, parsed_output]
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:'