Update app.py
Browse files
app.py
CHANGED
|
@@ -52,7 +52,7 @@ st.title('Ruang Belajar Deployment YoloV9')
|
|
| 52 |
|
| 53 |
# Sidebar
|
| 54 |
with st.sidebar:
|
| 55 |
-
video_source = st.radio('Pilih video source', ['
|
| 56 |
youtube_link = ""
|
| 57 |
if video_source == 'YouTube':
|
| 58 |
youtube_link = st.text_input('YouTube video link', '')
|
|
@@ -64,8 +64,8 @@ options = {"STREAM_RESOLUTION": "720p"}
|
|
| 64 |
if st.button('Start'):
|
| 65 |
if video_source == 'YouTube' and youtube_link:
|
| 66 |
process_video(youtube_link, model, options)
|
| 67 |
-
elif video_source == '
|
| 68 |
-
process_video('
|
| 69 |
|
| 70 |
# Note on closing resources
|
| 71 |
st.sidebar.markdown("### Note")
|
|
|
|
| 52 |
|
| 53 |
# Sidebar
|
| 54 |
with st.sidebar:
|
| 55 |
+
video_source = st.radio('Pilih video source', ['Webcam', 'YouTube'])
|
| 56 |
youtube_link = ""
|
| 57 |
if video_source == 'YouTube':
|
| 58 |
youtube_link = st.text_input('YouTube video link', '')
|
|
|
|
| 64 |
if st.button('Start'):
|
| 65 |
if video_source == 'YouTube' and youtube_link:
|
| 66 |
process_video(youtube_link, model, options)
|
| 67 |
+
elif video_source == 'Webcam':
|
| 68 |
+
process_video('Webcam', model)
|
| 69 |
|
| 70 |
# Note on closing resources
|
| 71 |
st.sidebar.markdown("### Note")
|