Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -3,9 +3,6 @@ import os
|
|
3 |
from git import Repo
|
4 |
import sys
|
5 |
|
6 |
-
# Display the title
|
7 |
-
st.title("AI Based Video Summary Tool")
|
8 |
-
|
9 |
# GitHub Repository and Directory Setup
|
10 |
repo_url = st.secrets["REPO_URL"] # The private repository URL
|
11 |
github_token = st.secrets["GITHUB_PAT"] # GitHub Personal Access Token
|
@@ -18,20 +15,22 @@ if not os.path.exists(local_dir):
|
|
18 |
st.write("Cloning the repository...")
|
19 |
Repo.clone_from(repo_url, local_dir)
|
20 |
st.success("Repository cloned successfully!")
|
21 |
-
sys.path.insert(0, local_dir) # Add the repo directory to the system path
|
22 |
except Exception as e:
|
23 |
st.error(f"Error cloning repository: {e}")
|
24 |
-
|
25 |
-
|
|
|
26 |
|
27 |
# Import the necessary module from the cloned repository
|
28 |
try:
|
29 |
-
from your_video_processing_module import process_video #
|
30 |
except ImportError as e:
|
31 |
st.error(f"Error importing module: {e}")
|
|
|
32 |
|
33 |
# Video Summarization Interface
|
34 |
-
st.title("
|
|
|
35 |
|
36 |
uploaded_video = st.file_uploader("Upload a video", type=["mp4", "avi", "mov"])
|
37 |
|
|
|
3 |
from git import Repo
|
4 |
import sys
|
5 |
|
|
|
|
|
|
|
6 |
# GitHub Repository and Directory Setup
|
7 |
repo_url = st.secrets["REPO_URL"] # The private repository URL
|
8 |
github_token = st.secrets["GITHUB_PAT"] # GitHub Personal Access Token
|
|
|
15 |
st.write("Cloning the repository...")
|
16 |
Repo.clone_from(repo_url, local_dir)
|
17 |
st.success("Repository cloned successfully!")
|
|
|
18 |
except Exception as e:
|
19 |
st.error(f"Error cloning repository: {e}")
|
20 |
+
|
21 |
+
# Add the repo directory to the system path
|
22 |
+
sys.path.insert(0, local_dir)
|
23 |
|
24 |
# Import the necessary module from the cloned repository
|
25 |
try:
|
26 |
+
from your_video_processing_module import process_video # Replace with your actual module name
|
27 |
except ImportError as e:
|
28 |
st.error(f"Error importing module: {e}")
|
29 |
+
st.stop() # Stop the app if the module cannot be imported
|
30 |
|
31 |
# Video Summarization Interface
|
32 |
+
st.title("AI Based Video Summary Tool")
|
33 |
+
|
34 |
|
35 |
uploaded_video = st.file_uploader("Upload a video", type=["mp4", "avi", "mov"])
|
36 |
|