Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -65,7 +65,7 @@ amp = st.selectbox('Automatic Mixed Precision inference', (False, True))
|
|
65 |
max_det = st.number_input(label='Maximum number of detections per image', min_value=None, max_value=None, value=1000, step=1)
|
66 |
clicked = st.button('Excute')
|
67 |
with st.spinner('Loading the model...'):
|
68 |
-
read_pretrain(default_pretrained)
|
69 |
|
70 |
if clicked:
|
71 |
with st.spinner('Loading the image...'):
|
@@ -74,7 +74,8 @@ if clicked:
|
|
74 |
if default_pretrained != pretrained:
|
75 |
with st.spinner('Loading the model...'):
|
76 |
# model = torch.hub.load('ultralytics/yolov5', 'custom', path=os.path.join('pretrained', pretrained))
|
77 |
-
model = torch.hub.load('ultralytics/yolov5', 'custom', path=pretrained)
|
|
|
78 |
with st.spinner('Updating configuration...'):
|
79 |
model.conf = float(conf)
|
80 |
model.max_det = int(max_det)
|
|
|
65 |
max_det = st.number_input(label='Maximum number of detections per image', min_value=None, max_value=None, value=1000, step=1)
|
66 |
clicked = st.button('Excute')
|
67 |
with st.spinner('Loading the model...'):
|
68 |
+
model = read_pretrain(default_pretrained)
|
69 |
|
70 |
if clicked:
|
71 |
with st.spinner('Loading the image...'):
|
|
|
74 |
if default_pretrained != pretrained:
|
75 |
with st.spinner('Loading the model...'):
|
76 |
# model = torch.hub.load('ultralytics/yolov5', 'custom', path=os.path.join('pretrained', pretrained))
|
77 |
+
# model = torch.hub.load('ultralytics/yolov5', 'custom', path=pretrained)
|
78 |
+
model = read_pretrain(pretrained)
|
79 |
with st.spinner('Updating configuration...'):
|
80 |
model.conf = float(conf)
|
81 |
model.max_det = int(max_det)
|