vericudebuget commited on
Commit
a5191e9
·
verified ·
1 Parent(s): 292c192

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -74,7 +74,7 @@ def update_index_file(new_metadata_path):
74
 
75
  try:
76
  # Clone the Hugging Face repo
77
- subprocess.run(['git', 'clone', 'https://huggingface.co/spaces/vericudebuget/ok4231', temp_dir], check=True)
78
 
79
  # Find all existing JSON metadata files
80
  metadata_dir = os.path.join(temp_dir, 'metadata')
@@ -271,11 +271,14 @@ if uploaded_video:
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
  if should_generate_subs:
274
- st.warning("Subtitles will be generated automatically, and if the video is in another language, it will be translated automatically into English.")
 
275
  if video_duration > 1180:
276
  st.warning("Hey there! Just wanted to warn you that uploading pirated movies is not allowed.")
 
277
  if video_duration > 3600 and should_generate_subs:
278
  st.warning("Warning, for videos longer than an hour, generating subtitles will take some time! Please wait :)")
 
279
  if video_duration > 7000:
280
  st.warning("Now that's a long video. It will take a long time to upload. Make sure you have the right uploader details!")
281
 
 
74
 
75
  try:
76
  # Clone the Hugging Face repo
77
+ subprocess.run(['GIT_LFS_SKIP_SMUDGE=1', 'git', 'clone', 'https://huggingface.co/spaces/vericudebuget/ok4231', temp_dir], check=True)
78
 
79
  # Find all existing JSON metadata files
80
  metadata_dir = os.path.join(temp_dir, 'metadata')
 
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
  if should_generate_subs:
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.")
278
+
279
  if video_duration > 3600 and should_generate_subs:
280
  st.warning("Warning, for videos longer than an hour, generating subtitles will take some time! Please wait :)")
281
+
282
  if video_duration > 7000:
283
  st.warning("Now that's a long video. It will take a long time to upload. Make sure you have the right uploader details!")
284