eeshawn11 commited on
Commit
83c7032
·
1 Parent(s): b58eb9a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -2,9 +2,11 @@ import gradio as gr
2
  from ultralyticsplus import YOLO, render_result
3
  from ultralytics.yolo.utils.plotting import Annotator
4
 
 
 
5
  def yolov8_inference(
6
  image: gr.Image = None,
7
- model_path = 'eeshawn11/naruto_hand_seal_detection',
8
  conf_threshold: gr.Slider = 0.50,
9
  iou_threshold: gr.Slider = 0.45,
10
  ):
@@ -18,7 +20,7 @@ def yolov8_inference(
18
  Returns:
19
  Rendered image
20
  """
21
- model = YOLO(model_path)
22
  model.conf = conf_threshold
23
  model.iou = iou_threshold
24
  model.overrides['max_det'] = 1
 
2
  from ultralyticsplus import YOLO, render_result
3
  from ultralytics.yolo.utils.plotting import Annotator
4
 
5
+ model = YOLO('eeshawn11/naruto_hand_seal_detection')
6
+
7
  def yolov8_inference(
8
  image: gr.Image = None,
9
+ model = model,
10
  conf_threshold: gr.Slider = 0.50,
11
  iou_threshold: gr.Slider = 0.45,
12
  ):
 
20
  Returns:
21
  Rendered image
22
  """
23
+ # model = YOLO(model_path)
24
  model.conf = conf_threshold
25
  model.iou = iou_threshold
26
  model.overrides['max_det'] = 1