vumichien commited on
Commit
7b6cc37
1 Parent(s): 96fd0a4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -10
app.py CHANGED
@@ -73,16 +73,15 @@ def yolov8_inference(
73
  continue
74
  box = xyxy.tolist()
75
  area_rate = (box[2] - box[0]) * (box[3] - box[1]) / area_image
76
-
 
 
 
 
 
 
 
77
  if area_rate >= area_thres:
78
- object_prediction = ObjectPrediction(
79
- bbox=box,
80
- category_name=CLASS[int(cls)],
81
- category_id=int(cls),
82
- score=area_rate,
83
- )
84
- object_predictions.append(object_prediction)
85
- det_ind += 1
86
  html_bot_voice = tts(defaul_bot_voice, language="ja")
87
 
88
  result = visualize_object_predictions(
@@ -97,7 +96,7 @@ def yolov8_inference(
97
 
98
  outputs = [gr.Image(type="filepath", label="Output Image"),
99
  gr.HTML()]
100
- title = "State-of-the-Art YOLO Models for Object detection"
101
 
102
  demo_app = gr.Interface(
103
  fn=yolov8_inference,
 
73
  continue
74
  box = xyxy.tolist()
75
  area_rate = (box[2] - box[0]) * (box[3] - box[1]) / area_image
76
+ object_prediction = ObjectPrediction(
77
+ bbox=box,
78
+ category_name=CLASS[int(cls)],
79
+ category_id=int(cls),
80
+ score=area_rate,
81
+ )
82
+ object_predictions.append(object_prediction)
83
+ det_ind += 1
84
  if area_rate >= area_thres:
 
 
 
 
 
 
 
 
85
  html_bot_voice = tts(defaul_bot_voice, language="ja")
86
 
87
  result = visualize_object_predictions(
 
96
 
97
  outputs = [gr.Image(type="filepath", label="Output Image"),
98
  gr.HTML()]
99
+ title = "Detomo Aisatsu Robot"
100
 
101
  demo_app = gr.Interface(
102
  fn=yolov8_inference,