Spaces:
Sleeping
Sleeping
Salman11223
commited on
Commit
•
ad899fc
1
Parent(s):
34f4ff9
Update app.py
Browse files
app.py
CHANGED
@@ -9,8 +9,8 @@ import azure.cognitiveservices.speech as speechsdk
|
|
9 |
from moviepy.editor import AudioFileClip
|
10 |
from gradio_client import Client
|
11 |
|
12 |
-
def app(video_path, original_language, target_language
|
13 |
-
translate = Translate(video_path, target_language, original_language
|
14 |
video = translate.transcribe_and_translate()
|
15 |
# Return video in the output
|
16 |
return gr.Video(video)
|
@@ -24,11 +24,12 @@ interface = gr.Interface(
|
|
24 |
),
|
25 |
gr.Dropdown(
|
26 |
["English", "German", "French" ,"Spanish","Urdu"], label="Targeted Language"
|
27 |
-
)
|
28 |
-
gr.components.Textbox(label="Enter Float Value")
|
29 |
|
30 |
],
|
31 |
-
outputs=[gr.components.Video(label="Your result")]
|
|
|
32 |
)
|
33 |
|
34 |
interface.launch(debug=True)
|
|
|
9 |
from moviepy.editor import AudioFileClip
|
10 |
from gradio_client import Client
|
11 |
|
12 |
+
def app(video_path, original_language, target_language):
|
13 |
+
translate = Translate(video_path, target_language, original_language)
|
14 |
video = translate.transcribe_and_translate()
|
15 |
# Return video in the output
|
16 |
return gr.Video(video)
|
|
|
24 |
),
|
25 |
gr.Dropdown(
|
26 |
["English", "German", "French" ,"Spanish","Urdu"], label="Targeted Language"
|
27 |
+
)
|
28 |
+
# gr.components.Textbox(label="Enter Float Value")
|
29 |
|
30 |
],
|
31 |
+
# outputs=[gr.components.Video(label="Your result")]
|
32 |
+
outputs=[gr.components.File(label="Your result")]
|
33 |
)
|
34 |
|
35 |
interface.launch(debug=True)
|