markobinario commited on
Commit
575870b
·
verified ·
1 Parent(s): 0ef980f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -3
app.py CHANGED
@@ -120,7 +120,7 @@ with gr.Blocks(title="PDF OCR with PaddleOCR + PyMuPDF") as demo:
120
  text_output = gr.Textbox(label="Extracted Text", lines=20)
121
 
122
  # Auto-run OCR when a PDF is uploaded
123
- pdf_input.change(fn=gradio_predict, inputs=[pdf_input], outputs=[text_output])
124
 
125
  # Simple API note
126
  gr.Markdown("""
@@ -133,5 +133,3 @@ if __name__ == "__main__":
133
  # On Spaces, the host/port are managed by the platform. Locally, this runs on 7860 by default.
134
  demo.launch()
135
 
136
-
137
-
 
120
  text_output = gr.Textbox(label="Extracted Text", lines=20)
121
 
122
  # Auto-run OCR when a PDF is uploaded
123
+ pdf_input.change(fn=gradio_predict, inputs=[pdf_input], outputs=[text_output], api_name="predict")
124
 
125
  # Simple API note
126
  gr.Markdown("""
 
133
  # On Spaces, the host/port are managed by the platform. Locally, this runs on 7860 by default.
134
  demo.launch()
135