artificialguybr commited on
Commit
e460201
1 Parent(s): a3e6b2a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -161,7 +161,7 @@ def layout_analysis_workflow(image):
161
  layout_predictions = batch_layout_detection([image], layout_model, layout_processor, line_predictions)
162
 
163
  # Draw bounding boxes on the image
164
- image_with_boxes = draw_boxes(image.copy(), layout_predictions, color=(0, 255, 0))
165
 
166
  # Convert predictions to a serializable format
167
  serializable_predictions = []
@@ -246,4 +246,4 @@ with gr.Blocks(theme=gr.themes.Soft()) as demo:
246
 
247
  if __name__ == "__main__":
248
  logger.info("Iniciando aplicativo Gradio...")
249
- demo.launch()
 
161
  layout_predictions = batch_layout_detection([image], layout_model, layout_processor, line_predictions)
162
 
163
  # Draw bounding boxes on the image
164
+ image_with_boxes = draw_boxes(image.copy(), layout_predictions[0], color=(0, 255, 0))
165
 
166
  # Convert predictions to a serializable format
167
  serializable_predictions = []
 
246
 
247
  if __name__ == "__main__":
248
  logger.info("Iniciando aplicativo Gradio...")
249
+ demo.launch()