import streamlit as st import os from git import Repo # Display the title st.title("AI Based Video Summary Tool") # Use secret management for GitHub PAT github_token = st.secrets["GITHUB_PAT"] repo_url = st.text_input("https://github.com/NeeravSood/VST_HF") local_dir = "repo" # Directory to clone the repo into # Clone the private repository if st.button("Clone Repository"): if github_token and repo_url: try: # Use the provided token for authentication if repo_url.startswith("https://"): repo_url = repo_url.replace("https://", f"https://{github_token}@") Repo.clone_from(repo_url, local_dir) st.success("Repository cloned successfully!") except Exception as e: st.error(f"Error cloning repository: {e}") else: st.warning("Please provide the repository URL.") # Display contents of the cloned repository if os.path.exists(local_dir): files = os.listdir(local_dir) st.write("Files in the repository:") for file in files: st.write(file)