Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -6,6 +6,15 @@ import speech_recognition as sr
|
|
6 |
from googletrans import Translator, constants
|
7 |
from pprint import pprint
|
8 |
from moviepy.editor import *
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
def video_to_translate(file_obj,initial_language,final_language):
|
10 |
# Insert Local Video File Path
|
11 |
videoclip = VideoFileClip(file_obj.name)
|
|
|
6 |
from googletrans import Translator, constants
|
7 |
from pprint import pprint
|
8 |
from moviepy.editor import *
|
9 |
+
|
10 |
+
import subprocess
|
11 |
+
import sys
|
12 |
+
|
13 |
+
def install(package):
|
14 |
+
subprocess.check_call([sys.executable, "-m", "pip", "install", package])
|
15 |
+
install("googletrans==4.0.0rc1")
|
16 |
+
|
17 |
+
|
18 |
def video_to_translate(file_obj,initial_language,final_language):
|
19 |
# Insert Local Video File Path
|
20 |
videoclip = VideoFileClip(file_obj.name)
|