abidlabs HF staff commited on
Commit
d8a7b6b
β€’
1 Parent(s): 10c1df9
Files changed (1) hide show
  1. app.py +31 -5
app.py CHANGED
@@ -1,7 +1,33 @@
1
  import gradio as gr
2
 
3
- def greet(name):
4
- return "Hello " + name + "!!"
5
-
6
- demo = gr.Interface(fn=greet, inputs="text", outputs="image")
7
- demo.launch()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  import gradio as gr
2
 
3
+ with gr.Blocks(theme="base") as demo:
4
+ gr.Markdown("<center><h1> πŸ”Š Transcribe Anything </h1></center>")
5
+ with gr.Tab("Input"):
6
+ with gr.Row():
7
+ with gr.Column():
8
+ source = gr.Radio(label="Source type", choices=[("Audio", "audio"), ("Video", "video"), ("YouTube URL", "youtube")], value="Audio")
9
+ @gr.render(inputs=source)
10
+ def show_source(s):
11
+ if s == "Audio":
12
+ gr.Audio()
13
+ elif s == "Video":
14
+ gr.Video()
15
+ elif s == "YouTube URL":
16
+ t = gr.Textbox(placeholder="https://www.youtube.com/watch?v=44vi31hehw4")
17
+ h = gr.HTML(label="Video preview")
18
+ t.change(convert_to_embed_url, t, h)
19
+
20
+ with gr.Column():
21
+ gr.Dropdown(label="Languages", choices=["(Autodetect)", "English"], value="(Autodetect)")
22
+ gr.CheckboxGroup(label="Cleanup Transcript with LLM", choices=["Remove typos", "Separate into paragraphs"])
23
+ gr.Checkbox(label="Diarize Speakers (coming soon)", interactive=False)
24
+ transcribe_btn = gr.Button("Transcribe!")
25
+
26
+ with gr.Tab("Result"):
27
+ pass
28
+ with gr.Tab("Summarize"):
29
+ pass
30
+ with gr.Tab("Chat"):
31
+ pass
32
+
33
+ demo.launch()