Spaces:
Running
Running
jhj0517
commited on
Commit
•
6eeb731
1
Parent(s):
1e64bcc
better read
Browse files
app.py
CHANGED
@@ -4,6 +4,7 @@ import os
|
|
4 |
from ui.htmls import CSS, MARKDOWN
|
5 |
from modules.youtube_manager import get_ytmetas
|
6 |
|
|
|
7 |
def open_output_folder():
|
8 |
folder_path = "outputs"
|
9 |
if os.path.exists(folder_path):
|
@@ -11,6 +12,7 @@ def open_output_folder():
|
|
11 |
else:
|
12 |
print(f"The folder {folder_path} does not exist.")
|
13 |
|
|
|
14 |
def on_change_models(model_size):
|
15 |
translatable_model = ["large", "large-v1", "large-v2"]
|
16 |
if model_size not in translatable_model:
|
@@ -18,6 +20,7 @@ def on_change_models(model_size):
|
|
18 |
else:
|
19 |
return gr.Checkbox.update(visible=True, value=False, label="Translate to English?", interactive=True)
|
20 |
|
|
|
21 |
whisper_inf = WhisperInference()
|
22 |
block = gr.Blocks(css=CSS).queue(api_open=False)
|
23 |
|
|
|
4 |
from ui.htmls import CSS, MARKDOWN
|
5 |
from modules.youtube_manager import get_ytmetas
|
6 |
|
7 |
+
|
8 |
def open_output_folder():
|
9 |
folder_path = "outputs"
|
10 |
if os.path.exists(folder_path):
|
|
|
12 |
else:
|
13 |
print(f"The folder {folder_path} does not exist.")
|
14 |
|
15 |
+
|
16 |
def on_change_models(model_size):
|
17 |
translatable_model = ["large", "large-v1", "large-v2"]
|
18 |
if model_size not in translatable_model:
|
|
|
20 |
else:
|
21 |
return gr.Checkbox.update(visible=True, value=False, label="Translate to English?", interactive=True)
|
22 |
|
23 |
+
|
24 |
whisper_inf = WhisperInference()
|
25 |
block = gr.Blocks(css=CSS).queue(api_open=False)
|
26 |
|