Spaces:
Sleeping
Sleeping
File size: 860 Bytes
93a8660 4069ef5 3a282c5 f20a44c 93a8660 f20a44c 93a8660 f20a44c 93a8660 f20a44c 93a8660 f20a44c |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
from translate import Translate # Import the Translate class
import gradio as gr
def app(video_path, original_language, target_language, speaking_rate):
translate = Translate(video_path, target_language, original_language, speaking_rate)
video = translate.transcribe_and_translate()
# Return video in the output
return gr.Video(video)
interface = gr.Interface(
fn=app,
inputs=[
gr.components.Video(sources="upload", label="upload video"),
gr.Dropdown(
["English", "German", "French" ,"Spanish"], label="Original Language"
),
gr.Dropdown(
["English", "German", "French" ,"Spanish","Urdu"], label="Targeted Language"
),
gr.components.Textbox(label="Enter Float Value")
],
outputs=[gr.components.Video(label="Your result")]
)
interface.launch(debug=True) |