File size: 1,444 Bytes
8cd194c
 
407cc22
 
d8a7b6b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import gradio as gr

from utils import *

with gr.Blocks(theme="base") as demo:
    gr.Markdown("<center><h1> πŸ”Š Transcribe Anything </h1></center>")
    with gr.Tab("Input"):
        with gr.Row():
            with gr.Column():
                source = gr.Radio(label="Source type", choices=[("Audio", "audio"), ("Video", "video"), ("YouTube URL", "youtube")], value="Audio")
                @gr.render(inputs=source)
                def show_source(s):
                    if s == "Audio":
                        gr.Audio()
                    elif s == "Video":
                        gr.Video()
                    elif s == "YouTube URL":
                        t = gr.Textbox(placeholder="https://www.youtube.com/watch?v=44vi31hehw4")
                        h = gr.HTML(label="Video preview")
                        t.change(convert_to_embed_url, t, h)
                        
            with gr.Column():
                gr.Dropdown(label="Languages", choices=["(Autodetect)", "English"], value="(Autodetect)")
                gr.CheckboxGroup(label="Cleanup Transcript with LLM", choices=["Remove typos", "Separate into paragraphs"])
                gr.Checkbox(label="Diarize Speakers (coming soon)", interactive=False)
        transcribe_btn = gr.Button("Transcribe!")
                
    with gr.Tab("Result"):
        pass
    with gr.Tab("Summarize"):
        pass
    with gr.Tab("Chat"):
        pass
    
demo.launch()