vaugheu commited on
Commit
d1c20d5
1 Parent(s): 381b91a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +33 -35
app.py CHANGED
@@ -32,42 +32,40 @@ def speak(audio):
32
  engine.say(audio)
33
  engine.runAndWait()
34
 
35
- if st.sidebar.checkbox('Load Model Options'):
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
36
 
37
- # YOLOv8 Model
38
- if model_type == 'YOLOv8':
39
- path_model_file = 'yolov8.pt'
40
- from ultralytics import YOLO
41
- model = YOLO(path_model_file)
42
-
43
- if model_type == 'YOLOv9':
44
- path_model_file = 'yolov9c.pt'
45
- from ultralytics import YOLO
46
- model = YOLO(path_model_file)
47
- if model_type == 'YOLOv10':
48
- st.caption("Work in Progress... >_<")
49
- # path_model_file = 'yolov10n.pt'
50
- # from ultralytics import YOLO
51
- # model = YOLO(path_model_file)
52
-
53
- # Load Class names
54
- class_labels = model.names
55
-
56
- # Inference Mode
57
- options = st.sidebar.radio(
58
- 'Options:', ('Webcam', 'Image', 'Video'), index=1) # removed RTSP for now
59
-
60
- # Confidence
61
- confidence = st.sidebar.slider(
62
- 'Detection Confidence', min_value=0.0, max_value=1.0, value=0.25)
63
-
64
- # Draw thickness
65
- draw_thick = st.sidebar.slider(
66
- 'Draw Thickness:', min_value=1,
67
- max_value=20, value=3
68
- )
69
-
70
- color_pick_list = [None]*len(class_labels)
71
 
72
 
73
  # Image
 
32
  engine.say(audio)
33
  engine.runAndWait()
34
 
35
+ # Inference Mode
36
+ options = st.sidebar.radio(
37
+ 'Options:', ('Webcam', 'Image', 'Video'), index=1) # removed RTSP for now
38
+
39
+ # YOLOv8 Model
40
+ if model_type == 'YOLOv8':
41
+ path_model_file = 'yolov8.pt'
42
+ from ultralytics import YOLO
43
+ model = YOLO(path_model_file)
44
+
45
+ if model_type == 'YOLOv9':
46
+ path_model_file = 'yolov9c.pt'
47
+ from ultralytics import YOLO
48
+ model = YOLO(path_model_file)
49
+ if model_type == 'YOLOv10':
50
+ st.caption("Work in Progress... >_<")
51
+ # path_model_file = 'yolov10n.pt'
52
+ # from ultralytics import YOLO
53
+ # model = YOLO(path_model_file)
54
+
55
+ # Load Class names
56
+ class_labels = model.names
57
+
58
+ # Confidence
59
+ confidence = st.sidebar.slider(
60
+ 'Detection Confidence', min_value=0.0, max_value=1.0, value=0.25)
61
+
62
+ # Draw thickness
63
+ draw_thick = st.sidebar.slider(
64
+ 'Draw Thickness:', min_value=1,
65
+ max_value=20, value=3
66
+ )
67
 
68
+ color_pick_list = [None]*len(class_labels)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
69
 
70
 
71
  # Image