John Ho commited on
Commit
05f7921
·
1 Parent(s): 33aa4bb

renamed api endpoints

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -84,7 +84,6 @@ def process_image(
84
  list: a list of masks in the form of bit64 encoded strings
85
  """
86
  # input validation
87
- logger.debug(f"bboxes type: {type(bboxes)}, value: {bboxes}")
88
  has_bboxes = type(bboxes) != type(None) and bboxes != ""
89
  has_points = type(points) != type(None) and points != ""
90
  has_point_labels = type(point_labels) != type(None) and point_labels != ""
@@ -166,6 +165,7 @@ with gr.Blocks() as demo:
166
  ],
167
  outputs=gr.JSON(label="Output JSON"),
168
  title="SAM2 for Images",
 
169
  )
170
  with gr.Tab("Videos"):
171
  gr.Interface(
@@ -185,6 +185,7 @@ with gr.Blocks() as demo:
185
  ],
186
  outputs=gr.JSON(label="Output JSON"),
187
  title="SAM2 for Videos",
 
188
  )
189
 
190
  # Download checkpoints before launching the app
 
84
  list: a list of masks in the form of bit64 encoded strings
85
  """
86
  # input validation
 
87
  has_bboxes = type(bboxes) != type(None) and bboxes != ""
88
  has_points = type(points) != type(None) and points != ""
89
  has_point_labels = type(point_labels) != type(None) and point_labels != ""
 
165
  ],
166
  outputs=gr.JSON(label="Output JSON"),
167
  title="SAM2 for Images",
168
+ api_name="process_image",
169
  )
170
  with gr.Tab("Videos"):
171
  gr.Interface(
 
185
  ],
186
  outputs=gr.JSON(label="Output JSON"),
187
  title="SAM2 for Videos",
188
+ api_name="process_video",
189
  )
190
 
191
  # Download checkpoints before launching the app