isaakkamau commited on
Commit
081800f
·
1 Parent(s): 16957a4
Files changed (1) hide show
  1. app.py +1 -12
app.py CHANGED
@@ -155,7 +155,7 @@ def video2mp3(video_file, output_ext="mp3"):
155
  def translate(input_video):
156
  audio_file = video2mp3(input_video)
157
 
158
- options = dict(beam_size=5, best_of=5)
159
  translate_options = dict(task="translate", **options)
160
  result = model.transcribe(audio_file, **translate_options)
161
 
@@ -178,17 +178,6 @@ def translate(input_video):
178
 
179
  return output_video
180
 
181
- # ...
182
- In the code above, os.chmod() is used to modify the file permissions. stat.S_IRWXU sets the read, write, and execute permissions for the owner of the file. By granting these permissions, the app should have the necessary access to read the uploaded video file, write temporary files, and create the output files in the specified directory (/content/ in this case).
183
-
184
- Make sure to apply the appropriate permissions for your specific use case, depending on the desired level of access and security requirements.
185
-
186
-
187
-
188
-
189
-
190
-
191
-
192
 
193
 
194
  st.title("MultiLingual AI: Add Caption to Videos")
 
155
  def translate(input_video):
156
  audio_file = video2mp3(input_video)
157
 
158
+ options = dict(beam_size=5, best_of=5, fp16=False)
159
  translate_options = dict(task="translate", **options)
160
  result = model.transcribe(audio_file, **translate_options)
161
 
 
178
 
179
  return output_video
180
 
 
 
 
 
 
 
 
 
 
 
 
181
 
182
 
183
  st.title("MultiLingual AI: Add Caption to Videos")