Spaces:
Sleeping
Sleeping
Upload folder using huggingface_hub
Browse files
app.py
CHANGED
|
@@ -326,7 +326,7 @@ model_choices = [
|
|
| 326 |
("Base", "base"),
|
| 327 |
]
|
| 328 |
|
| 329 |
-
with gr.Blocks(
|
| 330 |
with gr.Column(elem_classes="glass-container"):
|
| 331 |
gr.HTML("<h1 class='glow-title'>Deepgram SRT Subtitles</h1>")
|
| 332 |
gr.HTML("<p class='sub-title'>Generate and translate SRT subtitles with state-of-the-art accuracy</p>")
|
|
@@ -372,10 +372,10 @@ with gr.Blocks(css=custom_css, title="Deepgram SRT Generator & Translator") as d
|
|
| 372 |
with gr.Column(scale=1):
|
| 373 |
with gr.Tabs():
|
| 374 |
with gr.TabItem("Original Subtitles"):
|
| 375 |
-
video_original_srt = gr.Textbox(label="SRT Output",
|
| 376 |
video_original_file = gr.File(label="Download original SRT")
|
| 377 |
with gr.TabItem("Translated Subtitles"):
|
| 378 |
-
video_translated_srt = gr.Textbox(label="Translated SRT Output",
|
| 379 |
video_translated_file = gr.File(label="Download translated SRT")
|
| 380 |
|
| 381 |
video_btn.click(
|
|
@@ -423,10 +423,10 @@ with gr.Blocks(css=custom_css, title="Deepgram SRT Generator & Translator") as d
|
|
| 423 |
with gr.Column(scale=1):
|
| 424 |
with gr.Tabs():
|
| 425 |
with gr.TabItem("Original Subtitles"):
|
| 426 |
-
audio_original_srt = gr.Textbox(label="SRT Output",
|
| 427 |
audio_original_file = gr.File(label="Download original SRT")
|
| 428 |
with gr.TabItem("Translated Subtitles"):
|
| 429 |
-
audio_translated_srt = gr.Textbox(label="Translated SRT Output",
|
| 430 |
audio_translated_file = gr.File(label="Download translated SRT")
|
| 431 |
|
| 432 |
audio_btn.click(
|
|
@@ -460,7 +460,7 @@ with gr.Blocks(css=custom_css, title="Deepgram SRT Generator & Translator") as d
|
|
| 460 |
srt_btn = gr.Button("Translate File", elem_classes="action-btn")
|
| 461 |
|
| 462 |
with gr.Column(scale=1):
|
| 463 |
-
srt_output_text = gr.Textbox(label="Translated SRT Output",
|
| 464 |
srt_output_file = gr.File(label="Download translated SRT")
|
| 465 |
|
| 466 |
srt_btn.click(
|
|
@@ -481,4 +481,4 @@ with gr.Blocks(css=custom_css, title="Deepgram SRT Generator & Translator") as d
|
|
| 481 |
|
| 482 |
if __name__ == "__main__":
|
| 483 |
demo.queue()
|
| 484 |
-
demo.launch(server_name="0.0.0.0", server_port=7860)
|
|
|
|
| 326 |
("Base", "base"),
|
| 327 |
]
|
| 328 |
|
| 329 |
+
with gr.Blocks(title="Deepgram SRT Generator & Translator") as demo:
|
| 330 |
with gr.Column(elem_classes="glass-container"):
|
| 331 |
gr.HTML("<h1 class='glow-title'>Deepgram SRT Subtitles</h1>")
|
| 332 |
gr.HTML("<p class='sub-title'>Generate and translate SRT subtitles with state-of-the-art accuracy</p>")
|
|
|
|
| 372 |
with gr.Column(scale=1):
|
| 373 |
with gr.Tabs():
|
| 374 |
with gr.TabItem("Original Subtitles"):
|
| 375 |
+
video_original_srt = gr.Textbox(label="SRT Output", buttons=["copy"], lines=15)
|
| 376 |
video_original_file = gr.File(label="Download original SRT")
|
| 377 |
with gr.TabItem("Translated Subtitles"):
|
| 378 |
+
video_translated_srt = gr.Textbox(label="Translated SRT Output", buttons=["copy"], lines=15)
|
| 379 |
video_translated_file = gr.File(label="Download translated SRT")
|
| 380 |
|
| 381 |
video_btn.click(
|
|
|
|
| 423 |
with gr.Column(scale=1):
|
| 424 |
with gr.Tabs():
|
| 425 |
with gr.TabItem("Original Subtitles"):
|
| 426 |
+
audio_original_srt = gr.Textbox(label="SRT Output", buttons=["copy"], lines=15)
|
| 427 |
audio_original_file = gr.File(label="Download original SRT")
|
| 428 |
with gr.TabItem("Translated Subtitles"):
|
| 429 |
+
audio_translated_srt = gr.Textbox(label="Translated SRT Output", buttons=["copy"], lines=15)
|
| 430 |
audio_translated_file = gr.File(label="Download translated SRT")
|
| 431 |
|
| 432 |
audio_btn.click(
|
|
|
|
| 460 |
srt_btn = gr.Button("Translate File", elem_classes="action-btn")
|
| 461 |
|
| 462 |
with gr.Column(scale=1):
|
| 463 |
+
srt_output_text = gr.Textbox(label="Translated SRT Output", buttons=["copy"], lines=15)
|
| 464 |
srt_output_file = gr.File(label="Download translated SRT")
|
| 465 |
|
| 466 |
srt_btn.click(
|
|
|
|
| 481 |
|
| 482 |
if __name__ == "__main__":
|
| 483 |
demo.queue()
|
| 484 |
+
demo.launch(server_name="0.0.0.0", server_port=7860, css=custom_css)
|