IAmTheHaider commited on
Commit
17ea106
·
verified ·
1 Parent(s): 1316115

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +18 -9
app.py CHANGED
@@ -23,6 +23,14 @@ confidence = float(st.sidebar.slider(
23
  source_img = None
24
 
25
  if model_type == 'Detection — **POT-YOLO**':
 
 
 
 
 
 
 
 
26
  model_path = Path(settings.DETECTION_MODEL_1)
27
  st.title("Object Detection And Tracking using POT-YOLO")
28
  try:
@@ -71,6 +79,14 @@ if model_type == 'Detection — **POT-YOLO**':
71
  # st.write(ex)
72
  st.write("No image is uploaded yet!")
73
  elif model_type == 'Detection — **African Wildlife** (BETA)':
 
 
 
 
 
 
 
 
74
  model_path = Path(settings.DETECTION_MODEL_2)
75
  st.title("Object Detection And Tracking using African-YOLO")
76
  try:
@@ -119,16 +135,9 @@ elif model_type == 'Detection — **African Wildlife** (BETA)':
119
  # st.write(ex)
120
  st.write("No image is uploaded yet!")
121
 
122
-
123
- st.sidebar.header("Image/Video Config")
124
- source_radio = st.sidebar.radio(
125
- "Select Source", settings.SOURCES_LIST)
126
-
127
-
128
  if source_radio == settings.IMAGE:
129
- source_img = st.sidebar.file_uploader(
130
- "Choose an image...", type=("jpg", "jpeg", "png", 'bmp', 'webp'))
131
-
132
 
133
  elif source_radio == settings.VIDEO:
134
  helper.play_stored_video(confidence, model)
 
23
  source_img = None
24
 
25
  if model_type == 'Detection — **POT-YOLO**':
26
+ st.sidebar.header("Image/Video Config")
27
+
28
+ source_radio = st.sidebar.radio(
29
+ "Select Source", settings.SOURCES_LIST)
30
+
31
+ if source_radio == settings.IMAGE:
32
+ source_img = st.sidebar.file_uploader(
33
+ "Choose an image...", type=("jpg", "jpeg", "png", 'bmp', 'webp'))
34
  model_path = Path(settings.DETECTION_MODEL_1)
35
  st.title("Object Detection And Tracking using POT-YOLO")
36
  try:
 
79
  # st.write(ex)
80
  st.write("No image is uploaded yet!")
81
  elif model_type == 'Detection — **African Wildlife** (BETA)':
82
+ st.sidebar.header("Image/Video Config")
83
+
84
+ source_radio = st.sidebar.radio(
85
+ "Select Source", settings.SOURCES_LIST)
86
+
87
+ if source_radio == settings.IMAGE:
88
+ source_img = st.sidebar.file_uploader(
89
+ "Choose an image...", type=("jpg", "jpeg", "png", 'bmp', 'webp'))
90
  model_path = Path(settings.DETECTION_MODEL_2)
91
  st.title("Object Detection And Tracking using African-YOLO")
92
  try:
 
135
  # st.write(ex)
136
  st.write("No image is uploaded yet!")
137
 
 
 
 
 
 
 
138
  if source_radio == settings.IMAGE:
139
+ print('Loaded')
140
+ # Image source selected
 
141
 
142
  elif source_radio == settings.VIDEO:
143
  helper.play_stored_video(confidence, model)