Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -4,9 +4,11 @@ import os
|
|
4 |
import speech_recognition as sr
|
5 |
from googletrans import Translator, constants
|
6 |
from pprint import pprint
|
7 |
-
#pip install moviepy
|
8 |
-
#pip3 install googletrans
|
9 |
from moviepy.editor import *
|
|
|
|
|
|
|
|
|
10 |
def video_to_translate(file_obj,initial_language,final_language):
|
11 |
# Insert Local Video File Path
|
12 |
videoclip = VideoFileClip(file_obj.name)
|
@@ -85,5 +87,5 @@ gr.Interface(fn = video_to_translate,
|
|
85 |
For more information visit <a href="https://ruslanmv.com/">ruslanmv.com</a>
|
86 |
</p>
|
87 |
</div>''',
|
88 |
-
|
89 |
).launch()
|
|
|
4 |
import speech_recognition as sr
|
5 |
from googletrans import Translator, constants
|
6 |
from pprint import pprint
|
|
|
|
|
7 |
from moviepy.editor import *
|
8 |
+
|
9 |
+
#Downloading the Demo video
|
10 |
+
os.system('wget https://huggingface.co/spaces/ruslanmv/Video-Translator/resolve/main/obama.mp4')
|
11 |
+
os.system('ls')
|
12 |
def video_to_translate(file_obj,initial_language,final_language):
|
13 |
# Insert Local Video File Path
|
14 |
videoclip = VideoFileClip(file_obj.name)
|
|
|
87 |
For more information visit <a href="https://ruslanmv.com/">ruslanmv.com</a>
|
88 |
</p>
|
89 |
</div>''',
|
90 |
+
examples=[['obama.mp4',"English",'Spanish']]
|
91 |
).launch()
|