Skip to content

Commit

Permalink
remove prints from server
Browse files Browse the repository at this point in the history
  • Loading branch information
sumn2u committed Aug 1, 2024
1 parent 9c35073 commit c966ecf
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions server/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,31 +170,18 @@ def get_auto_annotations():
raise ValueError("Invalid JSON data format: 'image_name' not found.")

image_annotations = []

base_url = request.host_url + "uploads/"

print(f"Base URL: {base_url}")
image_url = base_url + image_name

print(f"Image URL: {image_url}")

image = load_image_from_url(image_url)

regions = sam_model.predict(image)

formatted_regions = format_regions_for_frontend(regions, image_url, image.shape[1], image.shape[0])

print(f"Regions: {formatted_regions}")

image_annotations.append(
{
"image_name": image_name,
"image_source": image_url,
"regions": formatted_regions,
}
)

print(f"Image Annotations: {image_annotations}")
return jsonify(image_annotations), 200

except ValueError as ve:
Expand Down

0 comments on commit c966ecf

Please sign in to comment.