Update app.py
Browse files
app.py
CHANGED
|
@@ -18,12 +18,6 @@ with st.sidebar:
|
|
| 18 |
link_youtube = st.text_input('Masukan Link Youtube', '')
|
| 19 |
|
| 20 |
st.sidebar.image("logo.png", use_column_width=True)
|
| 21 |
-
# Process video
|
| 22 |
-
if st.button('Start'):
|
| 23 |
-
if video == 'YouTube' and link_youtube:
|
| 24 |
-
process_video(link_youtube, model)
|
| 25 |
-
elif video == 'Webcam':
|
| 26 |
-
process_video('Webcam', model)
|
| 27 |
|
| 28 |
|
| 29 |
# Load Model YOLOv9
|
|
@@ -65,4 +59,11 @@ def process_video(data, model):
|
|
| 65 |
FRAME_WINDOW.image(frame)
|
| 66 |
|
| 67 |
if data == 'Webcam':
|
| 68 |
-
camera.release()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
link_youtube = st.text_input('Masukan Link Youtube', '')
|
| 19 |
|
| 20 |
st.sidebar.image("logo.png", use_column_width=True)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 21 |
|
| 22 |
|
| 23 |
# Load Model YOLOv9
|
|
|
|
| 59 |
FRAME_WINDOW.image(frame)
|
| 60 |
|
| 61 |
if data == 'Webcam':
|
| 62 |
+
camera.release()
|
| 63 |
+
with st.sidebar:
|
| 64 |
+
# Process video
|
| 65 |
+
if st.button('Start'):
|
| 66 |
+
if video == 'YouTube' and link_youtube:
|
| 67 |
+
process_video(link_youtube, model)
|
| 68 |
+
elif video == 'Webcam':
|
| 69 |
+
process_video('Webcam', model)
|