Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -21,11 +21,11 @@ os.system('wget https://github.com/WongKinYiu/yolov7/releases/download/v0.1/yolo
|
|
21 |
|
22 |
#model='best'
|
23 |
def Custom_detect(img,mode):
|
24 |
-
if mode=='Custom
|
25 |
model='best'
|
26 |
-
|
27 |
model='yolov7-mask'
|
28 |
-
|
29 |
model='yolov7'
|
30 |
|
31 |
parser = argparse.ArgumentParser()
|
@@ -160,7 +160,8 @@ def Custom_detect(img,mode):
|
|
160 |
|
161 |
return Image.fromarray(im0[:,:,::-1])
|
162 |
inp = gr.Image(type="pil")
|
163 |
-
|
|
|
164 |
output = gr.Image(type="pil")
|
165 |
|
166 |
examples=["Examples/Image1.jpg","Examples/Image14.jpg","Examples/Image32.jpg"]
|
|
|
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 |
|
31 |
parser = argparse.ArgumentParser()
|
|
|
160 |
|
161 |
return Image.fromarray(im0[:,:,::-1])
|
162 |
inp = gr.Image(type="pil")
|
163 |
+
gr.Dropdown(default="Yolo_v7_Custom_trained_By_Owais",choices=["Yolo_v7_Custom_trained_By_Owais","yolov7","yolov7-e6"])
|
164 |
+
inp2= gr.Dropdown(default="Custom Detection",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"]
|