storresbusquets commited on
Commit
557ac16
โ€ข
1 Parent(s): 2e2b1f1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +46 -46
app.py CHANGED
@@ -420,57 +420,57 @@ with block as demo:
420
  )
421
  with gr.Group():
422
  with gr.Tab("From YouTube ๐Ÿ“น"):
423
- # with gr.Box():
424
 
425
- with gr.Row().style(equal_height=True):
426
- size = gr.Dropdown(
427
- label="Speech-to-text Model Size", choices=gio.sizes, value="base"
428
- )
429
- lang = gr.Dropdown(
430
- label="Language (Optional)", choices=gio.langs, value="none"
 
 
 
431
  )
432
- link = gr.Textbox(
433
- label="YouTube Link", placeholder="Enter YouTube link..."
434
- )
435
-
436
- with gr.Row().style(equal_height=True):
437
- with gr.Column(variant="panel", scale=1):
438
- title = gr.Label(label="Video Title")
439
- img = gr.Image(label="Thumbnail").style(height=350)
 
 
 
 
440
 
441
- with gr.Column(variant="panel", scale=1):
442
- text = gr.Textbox(
443
- label="Transcription",
444
- placeholder="Transcription Output...",
445
- lines=18,
446
- ).style(show_copy_button=True)
 
 
 
 
 
 
 
447
 
448
- with gr.Row().style(equal_height=True):
449
- summary = gr.Textbox(
450
- label="Summary", placeholder="Summary Output...", lines=5
451
- ).style(show_copy_button=True,
452
- # container=True
453
- )
454
- keywords = gr.Textbox(
455
- label="Keywords", placeholder="Keywords Output...", lines=5
456
- ).style(show_copy_button=True,
457
- # container=True
458
- )
459
- label = gr.Label(label="Sentiment Analysis")
460
- wordcloud_image = gr.Image(label="WordCloud")
461
-
462
- with gr.Row():
463
- btn = gr.Button("Get Video Insights ๐Ÿ”Ž", variant="primary", scale=1)
464
- clear = gr.ClearButton(
465
- [link, title, img, text, summary, keywords, label, wordcloud_image],
466
- value="Clear ๐Ÿ—‘๏ธ", scale=1
467
  )
468
- btn.click(
469
- gio,
470
- inputs=[link, lang, size],
471
- outputs=[text, summary, keywords, label, wordcloud_image],
472
- )
473
- link.change(gio.populate_metadata, inputs=[link], outputs=[img, title])
474
 
475
  with gr.Tab("From Audio file ๐ŸŽ™๏ธ"):
476
  with gr.Box():
 
420
  )
421
  with gr.Group():
422
  with gr.Tab("From YouTube ๐Ÿ“น"):
423
+ with gr.Box():
424
 
425
+ with gr.Row().style(equal_height=True):
426
+ size = gr.Dropdown(
427
+ label="Speech-to-text Model Size", choices=gio.sizes, value="base"
428
+ )
429
+ lang = gr.Dropdown(
430
+ label="Language (Optional)", choices=gio.langs, value="none"
431
+ )
432
+ link = gr.Textbox(
433
+ label="YouTube Link", placeholder="Enter YouTube link..."
434
  )
435
+
436
+ with gr.Row().style(equal_height=True):
437
+ with gr.Column(variant="panel", scale=1):
438
+ title = gr.Label(label="Video Title")
439
+ img = gr.Image(label="Thumbnail").style(height=350)
440
+
441
+ with gr.Column(variant="panel", scale=1):
442
+ text = gr.Textbox(
443
+ label="Transcription",
444
+ placeholder="Transcription Output...",
445
+ lines=18,
446
+ ).style(show_copy_button=True)
447
 
448
+ with gr.Row().style(equal_height=True):
449
+ summary = gr.Textbox(
450
+ label="Summary", placeholder="Summary Output...", lines=5
451
+ ).style(show_copy_button=True,
452
+ # container=True
453
+ )
454
+ keywords = gr.Textbox(
455
+ label="Keywords", placeholder="Keywords Output...", lines=5
456
+ ).style(show_copy_button=True,
457
+ # container=True
458
+ )
459
+ label = gr.Label(label="Sentiment Analysis")
460
+ wordcloud_image = gr.Image(label="WordCloud")
461
 
462
+ with gr.Row():
463
+ btn = gr.Button("Get Video Insights ๐Ÿ”Ž", variant="primary", scale=1)
464
+ clear = gr.ClearButton(
465
+ [link, title, img, text, summary, keywords, label, wordcloud_image],
466
+ value="Clear ๐Ÿ—‘๏ธ", scale=1
467
+ )
468
+ btn.click(
469
+ gio,
470
+ inputs=[link, lang, size],
471
+ outputs=[text, summary, keywords, label, wordcloud_image],
 
 
 
 
 
 
 
 
 
472
  )
473
+ link.change(gio.populate_metadata, inputs=[link], outputs=[img, title])
 
 
 
 
 
474
 
475
  with gr.Tab("From Audio file ๐ŸŽ™๏ธ"):
476
  with gr.Box():