Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -36,7 +36,7 @@ def main():
|
|
36 |
st.sidebar.success('To continue select "Run the app".')
|
37 |
elif app_mode == "Show the source code":
|
38 |
readme_text.empty()
|
39 |
-
st.code(open("
|
40 |
elif app_mode == "Run the app":
|
41 |
# Download external dependencies.
|
42 |
for filename in EXTERNAL_DEPENDENCIES.keys():
|
@@ -48,27 +48,27 @@ def main():
|
|
48 |
# External files to download.
|
49 |
EXTERNAL_DEPENDENCIES = {
|
50 |
"yolov4_tiny.pth": {
|
51 |
-
"url": "https://github.com/
|
52 |
"size": 23631189
|
53 |
},
|
54 |
"yolov4_SE.pth": {
|
55 |
-
"url": "https://github.com/
|
56 |
"size": 23806027
|
57 |
},
|
58 |
"yolov4_CBAM.pth":{
|
59 |
-
"url": "https://github.com/
|
60 |
"size": 23981478
|
61 |
},
|
62 |
"yolov4_ECA.pth":{
|
63 |
-
"url": "https://github.com/
|
64 |
"size": 23632688
|
65 |
},
|
66 |
"yolov4_weights_ep150_608.pth":{
|
67 |
-
"url": "https://github.com/
|
68 |
"size": 256423031
|
69 |
},
|
70 |
"yolov4_weights_ep150_416.pth":{
|
71 |
-
"url": "https://github.com/
|
72 |
"size": 256423031
|
73 |
},
|
74 |
}
|
@@ -137,7 +137,7 @@ def run_the_app():
|
|
137 |
if not tiny:
|
138 |
shape = st.sidebar.selectbox("Choose shape to Input:", [416,608])
|
139 |
conf,nms = object_detector_ui()
|
140 |
-
@st.
|
141 |
def get_yolo(tiny,phi,conf,nms,shape=416):
|
142 |
weights = 'yolov4_tiny.pth'
|
143 |
if tiny:
|
|
|
36 |
st.sidebar.success('To continue select "Run the app".')
|
37 |
elif app_mode == "Show the source code":
|
38 |
readme_text.empty()
|
39 |
+
st.code(open("gesture.streamlit.py",encoding='utf-8').read())
|
40 |
elif app_mode == "Run the app":
|
41 |
# Download external dependencies.
|
42 |
for filename in EXTERNAL_DEPENDENCIES.keys():
|
|
|
48 |
# External files to download.
|
49 |
EXTERNAL_DEPENDENCIES = {
|
50 |
"yolov4_tiny.pth": {
|
51 |
+
"url": "https://github.com/Kedreamix/YoloGesture/releases/download/v1.0/yolov4_tiny.pth",
|
52 |
"size": 23631189
|
53 |
},
|
54 |
"yolov4_SE.pth": {
|
55 |
+
"url": "https://github.com/Kedreamix/YoloGesture/releases/download/v1.0/yolov4_SE.pth",
|
56 |
"size": 23806027
|
57 |
},
|
58 |
"yolov4_CBAM.pth":{
|
59 |
+
"url": "https://github.com/Kedreamix/YoloGesture/releases/download/v1.0/yolov4_CBAM.pth",
|
60 |
"size": 23981478
|
61 |
},
|
62 |
"yolov4_ECA.pth":{
|
63 |
+
"url": "https://github.com/Kedreamix/YoloGesture/releases/download/v1.0/yolov4_ECA.pth",
|
64 |
"size": 23632688
|
65 |
},
|
66 |
"yolov4_weights_ep150_608.pth":{
|
67 |
+
"url": "https://github.com/Kedreamix/YoloGesture/releases/download/v1.0/yolov4_weights_ep150_608.pth",
|
68 |
"size": 256423031
|
69 |
},
|
70 |
"yolov4_weights_ep150_416.pth":{
|
71 |
+
"url": "https://github.com/Kedreamix/YoloGesture/releases/download/v1.0/yolov4_weights_ep150_416.pth",
|
72 |
"size": 256423031
|
73 |
},
|
74 |
}
|
|
|
137 |
if not tiny:
|
138 |
shape = st.sidebar.selectbox("Choose shape to Input:", [416,608])
|
139 |
conf,nms = object_detector_ui()
|
140 |
+
@st.cache_data
|
141 |
def get_yolo(tiny,phi,conf,nms,shape=416):
|
142 |
weights = 'yolov4_tiny.pth'
|
143 |
if tiny:
|