artificialguybr commited on
Commit
2047d3f
·
verified ·
1 Parent(s): 1fa53a1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -0
app.py CHANGED
@@ -78,12 +78,15 @@ def text_line_detection_function_cli(img):
78
  if os.path.exists(result_json_path):
79
  with open(result_json_path, "r", encoding='utf-8') as file:
80
  result_json = json.load(file)
 
81
  else:
82
  result_json = {"error": "No detection results found"}
83
 
84
  # Limpeza movida para depois da leitura dos resultados
85
  os.remove(img_path)
86
  logging.info(f"Limpeza concluída para {img_path}")
 
 
87
  return result_img, result_json
88
 
89
  with gr.Blocks() as app:
 
78
  if os.path.exists(result_json_path):
79
  with open(result_json_path, "r", encoding='utf-8') as file:
80
  result_json = json.load(file)
81
+ print(result_json) # Add this line
82
  else:
83
  result_json = {"error": "No detection results found"}
84
 
85
  # Limpeza movida para depois da leitura dos resultados
86
  os.remove(img_path)
87
  logging.info(f"Limpeza concluída para {img_path}")
88
+ print(result_img_path) # Add this line
89
+ print(result_json_path) # Add this line
90
  return result_img, result_json
91
 
92
  with gr.Blocks() as app: