heerjtdev commited on
Commit
06c1298
·
verified ·
1 Parent(s): 72a455b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -2
app.py CHANGED
@@ -159,10 +159,16 @@ print(os.listdir('.'))
159
  # ==============================
160
  # PIPELINE IMPORT
161
  # ==============================
 
 
 
 
162
  try:
163
  from working_yolo_pipeline import run_document_pipeline, DEFAULT_LAYOUTLMV3_MODEL_PATH, WEIGHTS_PATH
164
- except ImportError:
165
- print("Warning: 'working_yolo_pipeline.py' not found. Using dummy paths.")
 
 
166
  def run_document_pipeline(*args):
167
  return {"error": "Placeholder pipeline function called."}
168
  DEFAULT_LAYOUTLMV3_MODEL_PATH = "./models/layoutlmv3_model"
 
159
  # ==============================
160
  # PIPELINE IMPORT
161
  # ==============================
162
+ # try:
163
+ # from working_yolo_pipeline import run_document_pipeline, DEFAULT_LAYOUTLMV3_MODEL_PATH, WEIGHTS_PATH
164
+ # except ImportError:
165
+ # print("Warning: 'working_yolo_pipeline.py' not found. Using dummy paths.")
166
  try:
167
  from working_yolo_pipeline import run_document_pipeline, DEFAULT_LAYOUTLMV3_MODEL_PATH, WEIGHTS_PATH
168
+ except Exception as e: # Catch ALL exceptions
169
+ print(f"Warning: Failed to import pipeline: {e}")
170
+ import traceback
171
+ traceback.print_exc() # Show the actual error
172
  def run_document_pipeline(*args):
173
  return {"error": "Placeholder pipeline function called."}
174
  DEFAULT_LAYOUTLMV3_MODEL_PATH = "./models/layoutlmv3_model"