KevanSoon commited on
Commit
499661e
·
1 Parent(s): 2166263

added a dual ocr workflow

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -1312,6 +1312,7 @@ async def translate_document_dual_ocr(
1312
  status_code=400,
1313
  detail="Neither Tesseract nor PaddleOCR could extract any data from the image.",
1314
  )
 
1315
  print("***** Step 1 Done: Finished OCR extraction ******")
1316
 
1317
  # === STEP 2: Translate both OCR outputs concurrently ===
@@ -1321,6 +1322,7 @@ async def translate_document_dual_ocr(
1321
  translated_hocr, translated_paddle = await asyncio.gather(
1322
  translated_hocr_task, translated_paddle_task
1323
  )
 
1324
  print("***** Step 2 Done: Finished translation ******")
1325
 
1326
  # === STEP 3: Generate final HTML from both translated outputs ===
 
1312
  status_code=400,
1313
  detail="Neither Tesseract nor PaddleOCR could extract any data from the image.",
1314
  )
1315
+ print(paddle_task)
1316
  print("***** Step 1 Done: Finished OCR extraction ******")
1317
 
1318
  # === STEP 2: Translate both OCR outputs concurrently ===
 
1322
  translated_hocr, translated_paddle = await asyncio.gather(
1323
  translated_hocr_task, translated_paddle_task
1324
  )
1325
+ print(translated_paddle_task)
1326
  print("***** Step 2 Done: Finished translation ******")
1327
 
1328
  # === STEP 3: Generate final HTML from both translated outputs ===