prthm11 commited on
Commit
236f847
·
verified ·
1 Parent(s): 99bcb1e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -6
app.py CHANGED
@@ -1290,15 +1290,22 @@ If you find any "Code-Blocks" then,
1290
  ]
1291
 
1292
  try:
1293
- return
 
 
 
 
 
 
 
1294
  # Invoke the main agent for logic refinement and relationship identification
1295
  # response = agent.invoke({"messages": [{"role": "user", "content": content}]})
1296
  # llm_output_raw = response["messages"][-1].content.strip()
1297
- llm_output_raw = ""
1298
- print(f"llm_output_raw: {response}")
1299
- parsed_llm_output = extract_json_from_llm_response(llm_output_raw)
1300
- result = parsed_llm_output
1301
- print(f"result:\n\n {result}")
1302
 
1303
  except json.JSONDecodeError as error_json:
1304
  # If JSON parsing fails, use the json resolver agent
 
1290
  ]
1291
 
1292
  try:
1293
+ return jsonify({
1294
+ "message": "❌ Scanned images are not clear please retry!",
1295
+ "isError": True,
1296
+ "output_json": "output_path",
1297
+ "sprites": "result",
1298
+ "project_output_json": "project_output",
1299
+ "test_url": download_url
1300
+ }), 500
1301
  # Invoke the main agent for logic refinement and relationship identification
1302
  # response = agent.invoke({"messages": [{"role": "user", "content": content}]})
1303
  # llm_output_raw = response["messages"][-1].content.strip()
1304
+ # llm_output_raw = ""
1305
+ # print(f"llm_output_raw: {response}")
1306
+ # parsed_llm_output = extract_json_from_llm_response(llm_output_raw)
1307
+ # result = parsed_llm_output
1308
+ # print(f"result:\n\n {result}")
1309
 
1310
  except json.JSONDecodeError as error_json:
1311
  # If JSON parsing fails, use the json resolver agent