Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -73,8 +73,11 @@ def update_index_file(new_metadata_path):
|
|
| 73 |
shutil.rmtree(temp_dir)
|
| 74 |
|
| 75 |
try:
|
|
|
|
| 76 |
# Clone the Hugging Face repo
|
| 77 |
-
subprocess.run(
|
|
|
|
|
|
|
| 78 |
|
| 79 |
# Find all existing JSON metadata files
|
| 80 |
metadata_dir = os.path.join(temp_dir, 'metadata')
|
|
@@ -269,9 +272,8 @@ if uploaded_video:
|
|
| 269 |
os.unlink(temp_video.name) # Clean up temp file
|
| 270 |
|
| 271 |
# Subtitle generation toggle, disabled if video is longer than 1 hour
|
| 272 |
-
should_generate_subs = st.toggle("Generate Subtitles", disabled=video_duration > 7200, value=True) # Renamed variable
|
| 273 |
-
|
| 274 |
-
st.warning("Subtitles will be generated automatically and will be translated automatically into English.")
|
| 275 |
|
| 276 |
if video_duration > 1180:
|
| 277 |
st.warning("Hey there! Just wanted to warn you that uploading pirated movies is not allowed.")
|
|
|
|
| 73 |
shutil.rmtree(temp_dir)
|
| 74 |
|
| 75 |
try:
|
| 76 |
+
|
| 77 |
# Clone the Hugging Face repo
|
| 78 |
+
subprocess.run('GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/spaces/vericudebuget/ok4231 ' + temp_dir,
|
| 79 |
+
shell=True,
|
| 80 |
+
check=True)
|
| 81 |
|
| 82 |
# Find all existing JSON metadata files
|
| 83 |
metadata_dir = os.path.join(temp_dir, 'metadata')
|
|
|
|
| 272 |
os.unlink(temp_video.name) # Clean up temp file
|
| 273 |
|
| 274 |
# Subtitle generation toggle, disabled if video is longer than 1 hour
|
| 275 |
+
should_generate_subs = st.toggle("Generate Subtitles.", disabled=video_duration > 7200, value=True) # Renamed variable
|
| 276 |
+
|
|
|
|
| 277 |
|
| 278 |
if video_duration > 1180:
|
| 279 |
st.warning("Hey there! Just wanted to warn you that uploading pirated movies is not allowed.")
|