juancopi81 commited on
Commit
6ca06af
1 Parent(s): 725e39d

Add preview button

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -110,6 +110,7 @@ with demo:
110
  start_second = gr.Number(label="Select starting point (in seconds) for the transcription",
111
  value=0,
112
  precision=0)
 
113
  with gr.Row().style(mobile_collapse=False, equal_height=True):
114
  title = gr.Label(label="Video Title", placeholder="Title")
115
  img = gr.Image(label="Thumbnail")
@@ -117,9 +118,9 @@ with demo:
117
  yt_audio = gr.Audio()
118
  yt_audio_path = gr.Textbox(visible=False)
119
 
120
- link.change(fn=populate_metadata,
121
- inputs=[link, start_second],
122
- outputs=[img, title, yt_audio, yt_audio_path])
123
 
124
  with gr.Row():
125
  btn = gr.Button("Transcribe music")
 
110
  start_second = gr.Number(label="Select starting point (in seconds) for the transcription",
111
  value=0,
112
  precision=0)
113
+ preview_btn = gr.Button("Preview")
114
  with gr.Row().style(mobile_collapse=False, equal_height=True):
115
  title = gr.Label(label="Video Title", placeholder="Title")
116
  img = gr.Image(label="Thumbnail")
 
118
  yt_audio = gr.Audio()
119
  yt_audio_path = gr.Textbox(visible=False)
120
 
121
+ preview_btn.click(fn=populate_metadata,
122
+ inputs=[link, start_second],
123
+ outputs=[img, title, yt_audio, yt_audio_path])
124
 
125
  with gr.Row():
126
  btn = gr.Button("Transcribe music")