Sa-m commited on
Commit
8f0eb81
·
1 Parent(s): 1a8045e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -17,14 +17,14 @@ from utils.torch_utils import select_device, load_classifier, time_synchronized,
17
 
18
  os.system('git clone https://github.com/WongKinYiu/yolov7')
19
  os.system('wget https://github.com/WongKinYiu/yolov7/releases/download/v0.1/yolov7.pt')
20
- os.system('wget https://github.com/WongKinYiu/yolov7/releases/download/v0.1/yolov7-mask.pt')
21
 
22
  #model='best'
23
  def Custom_detect(img,mode):
24
  if mode=='Custom-Detection':
25
  model='best'
26
- if mode=='Instance-Segmentation':
27
- model='yolov7-mask'
28
  if mode=='Yolov7-model-detection':
29
  model='yolov7'
30
 
@@ -161,7 +161,7 @@ def Custom_detect(img,mode):
161
  return Image.fromarray(im0[:,:,::-1])
162
  inp = gr.Image(type="pil")
163
 
164
- inp2= gr.Dropdown(choices=["Custom-Detection","Instance-Segmentation","Yolov7-model-detection"])
165
  output = gr.Image(type="pil")
166
 
167
  examples=["Examples/Image1.jpg","Examples/Image14.jpg","Examples/Image32.jpg"]
 
17
 
18
  os.system('git clone https://github.com/WongKinYiu/yolov7')
19
  os.system('wget https://github.com/WongKinYiu/yolov7/releases/download/v0.1/yolov7.pt')
20
+ #os.system('wget https://github.com/WongKinYiu/yolov7/releases/download/v0.1/yolov7-mask.pt')
21
 
22
  #model='best'
23
  def Custom_detect(img,mode):
24
  if mode=='Custom-Detection':
25
  model='best'
26
+ #if mode=='Instance-Segmentation':
27
+ #model='yolov7-mask'
28
  if mode=='Yolov7-model-detection':
29
  model='yolov7'
30
 
 
161
  return Image.fromarray(im0[:,:,::-1])
162
  inp = gr.Image(type="pil")
163
 
164
+ inp2= gr.Dropdown(choices=["Custom-Detection","Yolov7-model-detection"])
165
  output = gr.Image(type="pil")
166
 
167
  examples=["Examples/Image1.jpg","Examples/Image14.jpg","Examples/Image32.jpg"]