dschandra commited on
Commit
7fb29ae
·
verified ·
1 Parent(s): 8875201

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -56,8 +56,8 @@ def process_image(image_file):
56
  return {"ocr_status": "error", "message": "No image uploaded"}
57
 
58
  try:
59
- # Run OCR extraction from utils.py
60
- ocr_result = extract_kyc_fields(image_file.name)
61
  return {
62
  "salesforce_status": "connected",
63
  "sf_env": sf_status.get("env"),
@@ -66,6 +66,7 @@ def process_image(image_file):
66
  except Exception as e:
67
  return {"ocr_status": "error", "message": f"OCR extraction failed: {str(e)}"}
68
 
 
69
  # ------------------------
70
  # GRADIO INTERFACE
71
  # ------------------------
 
56
  return {"ocr_status": "error", "message": "No image uploaded"}
57
 
58
  try:
59
+ # Pass the filepath string directly, no .name
60
+ ocr_result = extract_kyc_fields(image_file)
61
  return {
62
  "salesforce_status": "connected",
63
  "sf_env": sf_status.get("env"),
 
66
  except Exception as e:
67
  return {"ocr_status": "error", "message": f"OCR extraction failed: {str(e)}"}
68
 
69
+
70
  # ------------------------
71
  # GRADIO INTERFACE
72
  # ------------------------