gopichandra commited on
Commit
c767428
·
verified ·
1 Parent(s): 73f6d86

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -4
app.py CHANGED
@@ -1,3 +1,6 @@
 
 
 
1
  import gradio as gr
2
  from utils import extract_kyc_fields
3
  import traceback
@@ -14,11 +17,11 @@ def process_document(file):
14
 
15
  iface = gr.Interface(
16
  fn=process_document,
17
- inputs=gr.File(label="Upload Aadhaar/PAN image", file_types=[".png", ".jpg", ".jpeg"]),
18
  outputs=gr.JSON(label="Extracted KYC Fields"),
19
- title="🔍 Smart KYC OCR (Powered by PaddleOCR)",
20
- description="Upload an Aadhaar or PAN card image. The tool extracts structured KYC fields using PaddleOCR.",
21
- theme="dark"
22
  )
23
 
24
  if __name__ == "__main__":
 
1
+ import os
2
+ os.environ["OMP_NUM_THREADS"] = "1" # Avoid threading conflict in Hugging Face
3
+
4
  import gradio as gr
5
  from utils import extract_kyc_fields
6
  import traceback
 
17
 
18
  iface = gr.Interface(
19
  fn=process_document,
20
+ inputs=gr.File(label="Upload Aadhaar/PAN image", file_types=[".jpg", ".jpeg", ".png"]),
21
  outputs=gr.JSON(label="Extracted KYC Fields"),
22
+ title="🔍 Smart KYC OCR (PaddleOCR)",
23
+ description="Upload Aadhaar or PAN card image to extract structured KYC fields using PaddleOCR.",
24
+ theme="default"
25
  )
26
 
27
  if __name__ == "__main__":