prthm11 commited on
Commit
352ea9e
·
verified ·
1 Parent(s): f552bf7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -1
app.py CHANGED
@@ -3208,7 +3208,14 @@ def process_pdf():
3208
 
3209
  except Exception as e:
3210
  logger.error(f"Error during processing the pdf workflow for project ID {project_id}: {e}", exc_info=True)
3211
- return jsonify({"error": f"❌ Failed to process PDF: {str(e)}"}), 500
 
 
 
 
 
 
 
3212
 
3213
  if __name__ == '__main__':
3214
  # os.makedirs("outputs", exist_ok=True) #== commented by P
 
3208
 
3209
  except Exception as e:
3210
  logger.error(f"Error during processing the pdf workflow for project ID {project_id}: {e}", exc_info=True)
3211
+ return jsonify({
3212
+ "message": "❌ Scanned images are not clear please retry!",
3213
+ "isError": True,
3214
+ "output_json": "output_path",
3215
+ "sprites": "result",
3216
+ "project_output_json": "project_output",
3217
+ "test_url": download_url
3218
+ }), 500
3219
 
3220
  if __name__ == '__main__':
3221
  # os.makedirs("outputs", exist_ok=True) #== commented by P