derekalia commited on
Commit
591bd80
·
1 Parent(s): 987cc76

another one

Browse files
Files changed (1) hide show
  1. app.py +7 -7
app.py CHANGED
@@ -86,15 +86,15 @@ def process(
86
  parsed_content_list = '\n'.join(parsed_content_list)
87
 
88
  # Format the coordinates output in a more readable way
89
- coordinates_text = "Bounding Box Coordinates (x, y, width, height):\n"
90
- for box_id, coords in sorted(label_coordinates.items(), key=lambda x: int(x[0])):
91
- # Convert numpy array to list and round values
92
- coords_list = coords.tolist()
93
- coords_formatted = [f"{coord:.1f}" for coord in coords_list]
94
- coordinates_text += f"Box {box_id}: [{coords_formatted[0]}, {coords_formatted[1]}, {coords_formatted[2]}, {coords_formatted[3]}]\n"
95
 
96
 
97
- return image, str(parsed_content_list), str(coordinates_text)
98
 
99
 
100
  with gr.Blocks() as demo:
 
86
  parsed_content_list = '\n'.join(parsed_content_list)
87
 
88
  # Format the coordinates output in a more readable way
89
+ # coordinates_text = "Bounding Box Coordinates (x, y, width, height):\n"
90
+ # for box_id, coords in sorted(label_coordinates.items(), key=lambda x: int(x[0])):
91
+ # # Convert numpy array to list and round values
92
+ # coords_list = coords.tolist()
93
+ # coords_formatted = [f"{coord:.1f}" for coord in coords_list]
94
+ # coordinates_text += f"Box {box_id}: [{coords_formatted[0]}, {coords_formatted[1]}, {coords_formatted[2]}, {coords_formatted[3]}]\n"
95
 
96
 
97
+ return image, str(parsed_content_list), str(label_coordinates)
98
 
99
 
100
  with gr.Blocks() as demo: