Spaces:
Sleeping
Sleeping
File size: 587 Bytes
1b0b939 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
import streamlit as st
from utils import download_mp4_from_youtube
import asyncio
def ui():
st.title("Youtube Video Summarizer")
# Create a form for URL input
with st.form(key='url_form'):
user_url = st.text_input("Please enter a URL:")
submit_button = st.form_submit_button(label='Submit')
# Display the URL when the form is submitted
if submit_button:
loop = asyncio.new_event_loop()
asyncio.set_event_loop(loop)
loop.run_until_complete(download_mp4_from_youtube(user_url))
if __name__ == "__main__":
ui()
|