Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -40,8 +40,6 @@ def read_pretrain(path):
|
|
40 |
return torch.hub.load('ultralytics/yolov5', 'custom', path=path)
|
41 |
|
42 |
default_pretrained = '2022.11.04-YOLOv5x6_1280-Hololive_Waifu_Classification.pt'
|
43 |
-
with st.spinner('Loading the model...'):
|
44 |
-
read_pretrain(default_pretrained)
|
45 |
|
46 |
st.title("Hololive Waifu Classification")
|
47 |
|
@@ -65,7 +63,9 @@ multi_label = st.selectbox('Multiple labels per box', (False, True))
|
|
65 |
agnostic = st.selectbox('Class-agnostic', (False, True))
|
66 |
amp = st.selectbox('Automatic Mixed Precision inference', (False, True))
|
67 |
max_det = st.number_input(label='Maximum number of detections per image', min_value=None, max_value=None, value=1000, step=1)
|
68 |
-
|
|
|
|
|
69 |
if st.button('Excute'):
|
70 |
with st.spinner('Loading the image...'):
|
71 |
image_path = check_file(image)
|
|
|
40 |
return torch.hub.load('ultralytics/yolov5', 'custom', path=path)
|
41 |
|
42 |
default_pretrained = '2022.11.04-YOLOv5x6_1280-Hololive_Waifu_Classification.pt'
|
|
|
|
|
43 |
|
44 |
st.title("Hololive Waifu Classification")
|
45 |
|
|
|
63 |
agnostic = st.selectbox('Class-agnostic', (False, True))
|
64 |
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 |
+
with st.spinner('Loading the model...'):
|
67 |
+
read_pretrain(default_pretrained)
|
68 |
+
|
69 |
if st.button('Excute'):
|
70 |
with st.spinner('Loading the image...'):
|
71 |
image_path = check_file(image)
|