Spaces:
Running
Running
jhj0517
commited on
Commit
•
e12e640
1
Parent(s):
ca26f25
add gradio components
Browse files
app.py
CHANGED
@@ -65,6 +65,8 @@ class App:
|
|
65 |
dd_compute_type = gr.Dropdown(label="Compute Type", choices=self.whisper_inf.available_compute_types, value=self.whisper_inf.current_compute_type, interactive=True)
|
66 |
nb_best_of = gr.Number(label="Best Of", value=5, interactive=True)
|
67 |
nb_patience = gr.Number(label="Patience", value=1, interactive=True)
|
|
|
|
|
68 |
with gr.Row():
|
69 |
btn_run = gr.Button("GENERATE SUBTITLE FILE", variant="primary")
|
70 |
with gr.Row():
|
@@ -81,7 +83,9 @@ class App:
|
|
81 |
no_speech_threshold=nb_no_speech_threshold,
|
82 |
compute_type=dd_compute_type,
|
83 |
best_of=nb_best_of,
|
84 |
-
patience=nb_patience
|
|
|
|
|
85 |
btn_run.click(fn=self.whisper_inf.transcribe_file,
|
86 |
inputs=params + whisper_params.to_list(),
|
87 |
outputs=[tb_indicator, files_subtitles])
|
@@ -115,6 +119,8 @@ class App:
|
|
115 |
dd_compute_type = gr.Dropdown(label="Compute Type", choices=self.whisper_inf.available_compute_types, value=self.whisper_inf.current_compute_type, interactive=True)
|
116 |
nb_best_of = gr.Number(label="Best Of", value=5, interactive=True)
|
117 |
nb_patience = gr.Number(label="Patience", value=1, interactive=True)
|
|
|
|
|
118 |
with gr.Row():
|
119 |
btn_run = gr.Button("GENERATE SUBTITLE FILE", variant="primary")
|
120 |
with gr.Row():
|
@@ -131,7 +137,9 @@ class App:
|
|
131 |
no_speech_threshold=nb_no_speech_threshold,
|
132 |
compute_type=dd_compute_type,
|
133 |
best_of=nb_best_of,
|
134 |
-
patience=nb_patience
|
|
|
|
|
135 |
btn_run.click(fn=self.whisper_inf.transcribe_youtube,
|
136 |
inputs=params + whisper_params.to_list(),
|
137 |
outputs=[tb_indicator, files_subtitles])
|
@@ -158,6 +166,8 @@ class App:
|
|
158 |
dd_compute_type = gr.Dropdown(label="Compute Type", choices=self.whisper_inf.available_compute_types, value=self.whisper_inf.current_compute_type, interactive=True)
|
159 |
nb_best_of = gr.Number(label="Best Of", value=5, interactive=True)
|
160 |
nb_patience = gr.Number(label="Patience", value=1, interactive=True)
|
|
|
|
|
161 |
with gr.Row():
|
162 |
btn_run = gr.Button("GENERATE SUBTITLE FILE", variant="primary")
|
163 |
with gr.Row():
|
@@ -174,7 +184,9 @@ class App:
|
|
174 |
no_speech_threshold=nb_no_speech_threshold,
|
175 |
compute_type=dd_compute_type,
|
176 |
best_of=nb_best_of,
|
177 |
-
patience=nb_patience
|
|
|
|
|
178 |
btn_run.click(fn=self.whisper_inf.transcribe_mic,
|
179 |
inputs=params + whisper_params.to_list(),
|
180 |
outputs=[tb_indicator, files_subtitles])
|
|
|
65 |
dd_compute_type = gr.Dropdown(label="Compute Type", choices=self.whisper_inf.available_compute_types, value=self.whisper_inf.current_compute_type, interactive=True)
|
66 |
nb_best_of = gr.Number(label="Best Of", value=5, interactive=True)
|
67 |
nb_patience = gr.Number(label="Patience", value=1, interactive=True)
|
68 |
+
cb_condition_on_previous_text = gr.Checkbox(label="Condition On Previous Text", value=False, interactive=True)
|
69 |
+
tb_initial_prompt = gr.Textbox(label="Initial Prompt", value=None, interactive=False)
|
70 |
with gr.Row():
|
71 |
btn_run = gr.Button("GENERATE SUBTITLE FILE", variant="primary")
|
72 |
with gr.Row():
|
|
|
83 |
no_speech_threshold=nb_no_speech_threshold,
|
84 |
compute_type=dd_compute_type,
|
85 |
best_of=nb_best_of,
|
86 |
+
patience=nb_patience,
|
87 |
+
condition_on_previous_text=cb_condition_on_previous_text,
|
88 |
+
initial_prompt=tb_initial_prompt)
|
89 |
btn_run.click(fn=self.whisper_inf.transcribe_file,
|
90 |
inputs=params + whisper_params.to_list(),
|
91 |
outputs=[tb_indicator, files_subtitles])
|
|
|
119 |
dd_compute_type = gr.Dropdown(label="Compute Type", choices=self.whisper_inf.available_compute_types, value=self.whisper_inf.current_compute_type, interactive=True)
|
120 |
nb_best_of = gr.Number(label="Best Of", value=5, interactive=True)
|
121 |
nb_patience = gr.Number(label="Patience", value=1, interactive=True)
|
122 |
+
cb_condition_on_previous_text = gr.Checkbox(label="Condition On Previous Text", value=False, interactive=True)
|
123 |
+
tb_initial_prompt = gr.Textbox(label="Initial Prompt", value=None, interactive=False)
|
124 |
with gr.Row():
|
125 |
btn_run = gr.Button("GENERATE SUBTITLE FILE", variant="primary")
|
126 |
with gr.Row():
|
|
|
137 |
no_speech_threshold=nb_no_speech_threshold,
|
138 |
compute_type=dd_compute_type,
|
139 |
best_of=nb_best_of,
|
140 |
+
patience=nb_patience,
|
141 |
+
condition_on_previous_text=cb_condition_on_previous_text,
|
142 |
+
initial_prompt=tb_initial_prompt)
|
143 |
btn_run.click(fn=self.whisper_inf.transcribe_youtube,
|
144 |
inputs=params + whisper_params.to_list(),
|
145 |
outputs=[tb_indicator, files_subtitles])
|
|
|
166 |
dd_compute_type = gr.Dropdown(label="Compute Type", choices=self.whisper_inf.available_compute_types, value=self.whisper_inf.current_compute_type, interactive=True)
|
167 |
nb_best_of = gr.Number(label="Best Of", value=5, interactive=True)
|
168 |
nb_patience = gr.Number(label="Patience", value=1, interactive=True)
|
169 |
+
cb_condition_on_previous_text = gr.Checkbox(label="Condition On Previous Text", value=False, interactive=True)
|
170 |
+
tb_initial_prompt = gr.Textbox(label="Initial Prompt", value=None, interactive=False)
|
171 |
with gr.Row():
|
172 |
btn_run = gr.Button("GENERATE SUBTITLE FILE", variant="primary")
|
173 |
with gr.Row():
|
|
|
184 |
no_speech_threshold=nb_no_speech_threshold,
|
185 |
compute_type=dd_compute_type,
|
186 |
best_of=nb_best_of,
|
187 |
+
patience=nb_patience,
|
188 |
+
condition_on_previous_text=cb_condition_on_previous_text,
|
189 |
+
initial_prompt=tb_initial_prompt)
|
190 |
btn_run.click(fn=self.whisper_inf.transcribe_mic,
|
191 |
inputs=params + whisper_params.to_list(),
|
192 |
outputs=[tb_indicator, files_subtitles])
|