AAAAAAyq commited on
Commit
5350ba4
β€’
1 Parent(s): 9724c61

Update the examples

Browse files
Files changed (2) hide show
  1. app.py +3 -2
  2. tools.py +1 -1
app.py CHANGED
@@ -12,10 +12,11 @@ title = "<center><strong><font size='8'>πŸƒ Fast Segment Anything πŸ€—</font></
12
  news = """ # News
13
 
14
  πŸ”₯ Add the 'Advanced options" in Everything mode to get a more detailed adjustment.
15
-
16
- # πŸ”₯ Support the points mode and box mode, text mode will come soon.
17
  """
18
 
 
 
 
19
  description = """This is a demo on Github project πŸƒ [Fast Segment Anything Model](https://github.com/CASIA-IVA-Lab/FastSAM).
20
 
21
  🎯 Upload an Image, segment it with Fast Segment Anything (Everything mode). The other modes will come soon.
 
12
  news = """ # News
13
 
14
  πŸ”₯ Add the 'Advanced options" in Everything mode to get a more detailed adjustment.
 
 
15
  """
16
 
17
+
18
+ # πŸ”₯ Support the points mode and box mode, text mode will come soon.
19
+
20
  description = """This is a demo on Github project πŸƒ [Fast Segment Anything Model](https://github.com/CASIA-IVA-Lab/FastSAM).
21
 
22
  🎯 Upload an Image, segment it with Fast Segment Anything (Everything mode). The other modes will come soon.
tools.py CHANGED
@@ -293,7 +293,7 @@ def fast_show_mask_gpu(
293
  # clip
294
  @torch.no_grad()
295
  def retriev(
296
- model, preprocess, elements: [Image.Image], search_text: str, device
297
  ) -> int:
298
  preprocessed_images = [preprocess(image).to(device) for image in elements]
299
  tokenized_text = clip.tokenize([search_text]).to(device)
 
293
  # clip
294
  @torch.no_grad()
295
  def retriev(
296
+ model, preprocess, elements, search_text: str, device
297
  ) -> int:
298
  preprocessed_images = [preprocess(image).to(device) for image in elements]
299
  tokenized_text = clip.tokenize([search_text]).to(device)