File size: 1,035 Bytes
4f4f224
417549f
 
22801e0
 
 
 
 
2943092
22801e0
 
 
 
806da2c
22801e0
 
 
 
 
 
 
 
 
76780b5
22801e0
 
 
76780b5
 
 
 
22801e0
76780b5
22801e0
 
 
 
 
aaf8f7d
22801e0
aaf8f7d
76780b5
22801e0
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
import streamlit as st
from PIL import Image

from youtube_downloader import Download
from collections import deque
from prediction import Predict

downld=Download()
st.snow()

st.title("Human Action Recognization [DL]")
with st.expander("Details", expanded=False):
    st.write('''
        need to add the details as this is under development''')
    

url= st.text_input("Insert Youtube Url as instructed above ")

if st.button("submit"):
    title, output_dir=downld.youtube_d(url)
    col1, col2 = st.columns([2, 2])

    with col1:
        st.success('Video Downloaded!', icon="✅")
        print(output_dir)
        st.video(f"{output_dir}/{title}.mp4")

        
        


    with col2:
        st.info("Wait a while Model is Performing its Task")
        pred =Predict()
        frames_needed=25
        input_path=f"{output_dir}/{title}.mp4"
        output_path=f"test_videos/{title}_output.mp4"
        pred.prediction(input_path,output_path ,frames_needed)
        

        st.video(output_path)
        st.balloons()