ch-tseng commited on
Commit
d0dd251
·
1 Parent(s): 96999c2
Files changed (1) hide show
  1. app.py +4 -15
app.py CHANGED
@@ -40,32 +40,21 @@ st.title(file_exist)
40
  st.sidebar.header("DL Model Config")
41
 
42
  # model options
43
- task_type = st.sidebar.selectbox(
44
- "Select Task",
45
- ["Detection"]
46
- )
47
-
48
- model_type = None
49
- if task_type == "Detection":
50
- model_type = st.sidebar.selectbox(
51
- "Select Model",
52
- config.DETECTION_MODEL_LIST
53
- )
54
- else:
55
- st.error("Currently only 'Detection' function is implemented")
56
 
57
  confidence = float(st.sidebar.slider(
58
  "Select Model Confidence", 30, 100, 50)) / 100
59
 
60
- model_path = ""
61
  if model_type:
62
  #model_path = Path(config.DETECTION_MODEL_DIR, str(model_type))
63
- model_path = config.DETECTION_MODEL_DIR
64
  else:
65
  st.error("Please Select Model in Sidebar")
66
 
67
  # load pretrained DL model
68
  try:
 
69
  model = load_model(model_path)
70
  except Exception as e:
71
  st.error(f"Unable to load model. Please check the specified path: {model_path}")
 
40
  st.sidebar.header("DL Model Config")
41
 
42
  # model options
43
+ task_type = "Detection"
44
+ model_type = "crowded_human"
 
 
 
 
 
 
 
 
 
 
 
45
 
46
  confidence = float(st.sidebar.slider(
47
  "Select Model Confidence", 30, 100, 50)) / 100
48
 
 
49
  if model_type:
50
  #model_path = Path(config.DETECTION_MODEL_DIR, str(model_type))
51
+ model_path = "./crowded_human_yolov8s.pt"
52
  else:
53
  st.error("Please Select Model in Sidebar")
54
 
55
  # load pretrained DL model
56
  try:
57
+ print('model_path', model_path)
58
  model = load_model(model_path)
59
  except Exception as e:
60
  st.error(f"Unable to load model. Please check the specified path: {model_path}")