mayrajeo commited on
Commit
6b5781d
1 Parent(s): 04323d1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -15,9 +15,9 @@ import PIL
15
  model_base = 'onnx_models'
16
 
17
  def inference(
18
- im:gr.inputs.Image=None,
19
- model_path:gr.inputs.Dropdown='YOLOv8n',
20
- conf_thr:gr.inputs.Slider=0.25
21
  ):
22
  #model = Yolov8DetectionModel(model_path=f'{model_base}/{model_path}/{model_path}.pt',
23
  model = Yolov8onnxDetectionModel(model_path=f'{model_base}/{model_path}/{model_path.lower()}.onnx',
@@ -43,7 +43,7 @@ def inference(
43
 
44
  inputs = [
45
  gr.Image(type='filepath', label='Input'),
46
- gr.components.Dropdown([
47
  'YOLOv8n',
48
  'YOLOv8s',
49
  'YOLOv8m',
@@ -51,7 +51,7 @@ inputs = [
51
  'YOLOv8x'
52
  ],
53
  value='YOLOv8n', label='Model'),
54
- gr.components.Slider(minimum=0.0, maximum=1.0, value=0.25, step=0.05, label='Confidence Threshold'),
55
  ]
56
 
57
  outputs = [
 
15
  model_base = 'onnx_models'
16
 
17
  def inference(
18
+ im:gr.Image=None,
19
+ model_path:gr.Dropdown='YOLOv8n',
20
+ conf_thr:gr.Slider=0.25
21
  ):
22
  #model = Yolov8DetectionModel(model_path=f'{model_base}/{model_path}/{model_path}.pt',
23
  model = Yolov8onnxDetectionModel(model_path=f'{model_base}/{model_path}/{model_path.lower()}.onnx',
 
43
 
44
  inputs = [
45
  gr.Image(type='filepath', label='Input'),
46
+ gr.Dropdown([
47
  'YOLOv8n',
48
  'YOLOv8s',
49
  'YOLOv8m',
 
51
  'YOLOv8x'
52
  ],
53
  value='YOLOv8n', label='Model'),
54
+ gr.Slider(minimum=0.0, maximum=1.0, value=0.25, step=0.05, label='Confidence Threshold'),
55
  ]
56
 
57
  outputs = [