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()