Spaces:
Running
Running
jhj0517
commited on
Commit
Β·
4fee6f0
1
Parent(s):
fbb635b
remove folder button
Browse files
app.py
CHANGED
@@ -124,9 +124,8 @@ class App:
|
|
124 |
with gr.Row():
|
125 |
btn_run = gr.Button("GENERATE SUBTITLE FILE", variant="primary")
|
126 |
with gr.Row():
|
127 |
-
tb_indicator = gr.Textbox(label="Output", scale=
|
128 |
files_subtitles = gr.Files(label="Downloadable output file", scale=3, interactive=False)
|
129 |
-
btn_openfolder = gr.Button('π', scale=1)
|
130 |
|
131 |
params = [input_file, dd_file_format, cb_timestamp]
|
132 |
whisper_params = WhisperParameters(model_size=dd_model,
|
@@ -158,7 +157,6 @@ class App:
|
|
158 |
btn_run.click(fn=self.whisper_inf.transcribe_file,
|
159 |
inputs=params + whisper_params.as_list(),
|
160 |
outputs=[tb_indicator, files_subtitles])
|
161 |
-
btn_openfolder.click(fn=lambda: self.open_folder("outputs"), inputs=None, outputs=None)
|
162 |
dd_model.change(fn=self.on_change_models, inputs=[dd_model], outputs=[cb_translate])
|
163 |
|
164 |
with gr.TabItem("Youtube"): # tab2
|
@@ -213,9 +211,8 @@ class App:
|
|
213 |
with gr.Row():
|
214 |
btn_run = gr.Button("GENERATE SUBTITLE FILE", variant="primary")
|
215 |
with gr.Row():
|
216 |
-
tb_indicator = gr.Textbox(label="Output", scale=
|
217 |
files_subtitles = gr.Files(label="Downloadable output file", scale=3)
|
218 |
-
btn_openfolder = gr.Button('π', scale=1)
|
219 |
|
220 |
params = [tb_youtubelink, dd_file_format, cb_timestamp]
|
221 |
whisper_params = WhisperParameters(model_size=dd_model,
|
@@ -249,7 +246,6 @@ class App:
|
|
249 |
outputs=[tb_indicator, files_subtitles])
|
250 |
tb_youtubelink.change(get_ytmetas, inputs=[tb_youtubelink],
|
251 |
outputs=[img_thumbnail, tb_title, tb_description])
|
252 |
-
btn_openfolder.click(fn=lambda: self.open_folder("outputs"), inputs=None, outputs=None)
|
253 |
dd_model.change(fn=self.on_change_models, inputs=[dd_model], outputs=[cb_translate])
|
254 |
|
255 |
with gr.TabItem("Mic"): # tab3
|
@@ -296,9 +292,8 @@ class App:
|
|
296 |
with gr.Row():
|
297 |
btn_run = gr.Button("GENERATE SUBTITLE FILE", variant="primary")
|
298 |
with gr.Row():
|
299 |
-
tb_indicator = gr.Textbox(label="Output", scale=
|
300 |
files_subtitles = gr.Files(label="Downloadable output file", scale=3)
|
301 |
-
btn_openfolder = gr.Button('π', scale=1)
|
302 |
|
303 |
params = [mic_input, dd_file_format]
|
304 |
whisper_params = WhisperParameters(model_size=dd_model,
|
@@ -330,7 +325,6 @@ class App:
|
|
330 |
btn_run.click(fn=self.whisper_inf.transcribe_mic,
|
331 |
inputs=params + whisper_params.as_list(),
|
332 |
outputs=[tb_indicator, files_subtitles])
|
333 |
-
btn_openfolder.click(fn=lambda: self.open_folder("outputs"), inputs=None, outputs=None)
|
334 |
dd_model.change(fn=self.on_change_models, inputs=[dd_model], outputs=[cb_translate])
|
335 |
|
336 |
with gr.TabItem("T2T Translation"): # tab 4
|
|
|
124 |
with gr.Row():
|
125 |
btn_run = gr.Button("GENERATE SUBTITLE FILE", variant="primary")
|
126 |
with gr.Row():
|
127 |
+
tb_indicator = gr.Textbox(label="Output", scale=6)
|
128 |
files_subtitles = gr.Files(label="Downloadable output file", scale=3, interactive=False)
|
|
|
129 |
|
130 |
params = [input_file, dd_file_format, cb_timestamp]
|
131 |
whisper_params = WhisperParameters(model_size=dd_model,
|
|
|
157 |
btn_run.click(fn=self.whisper_inf.transcribe_file,
|
158 |
inputs=params + whisper_params.as_list(),
|
159 |
outputs=[tb_indicator, files_subtitles])
|
|
|
160 |
dd_model.change(fn=self.on_change_models, inputs=[dd_model], outputs=[cb_translate])
|
161 |
|
162 |
with gr.TabItem("Youtube"): # tab2
|
|
|
211 |
with gr.Row():
|
212 |
btn_run = gr.Button("GENERATE SUBTITLE FILE", variant="primary")
|
213 |
with gr.Row():
|
214 |
+
tb_indicator = gr.Textbox(label="Output", scale=6)
|
215 |
files_subtitles = gr.Files(label="Downloadable output file", scale=3)
|
|
|
216 |
|
217 |
params = [tb_youtubelink, dd_file_format, cb_timestamp]
|
218 |
whisper_params = WhisperParameters(model_size=dd_model,
|
|
|
246 |
outputs=[tb_indicator, files_subtitles])
|
247 |
tb_youtubelink.change(get_ytmetas, inputs=[tb_youtubelink],
|
248 |
outputs=[img_thumbnail, tb_title, tb_description])
|
|
|
249 |
dd_model.change(fn=self.on_change_models, inputs=[dd_model], outputs=[cb_translate])
|
250 |
|
251 |
with gr.TabItem("Mic"): # tab3
|
|
|
292 |
with gr.Row():
|
293 |
btn_run = gr.Button("GENERATE SUBTITLE FILE", variant="primary")
|
294 |
with gr.Row():
|
295 |
+
tb_indicator = gr.Textbox(label="Output", scale=6)
|
296 |
files_subtitles = gr.Files(label="Downloadable output file", scale=3)
|
|
|
297 |
|
298 |
params = [mic_input, dd_file_format]
|
299 |
whisper_params = WhisperParameters(model_size=dd_model,
|
|
|
325 |
btn_run.click(fn=self.whisper_inf.transcribe_mic,
|
326 |
inputs=params + whisper_params.as_list(),
|
327 |
outputs=[tb_indicator, files_subtitles])
|
|
|
328 |
dd_model.change(fn=self.on_change_models, inputs=[dd_model], outputs=[cb_translate])
|
329 |
|
330 |
with gr.TabItem("T2T Translation"): # tab 4
|