Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -19,17 +19,18 @@ def main(conf):
|
|
19 |
|
20 |
with gr.TabItem(conf["layout"]["page_names"][0]):
|
21 |
|
22 |
-
gr.Markdown("π€ Non-Video Meeting Transcription and Speaker Diarization")
|
23 |
gr.Markdown("![](file/microphone_pen_and_paper.png)")
|
24 |
gr.Markdown(get_files.load_markdown_file(conf["layout"]["about"]))
|
25 |
|
26 |
|
27 |
with gr.TabItem(conf["layout"]["page_names"][1]):
|
28 |
-
|
29 |
audio_input = gr.Audio(type="filepath", label="Upload Audio File")
|
30 |
-
num_speakers = gr.Dropdown([
|
|
|
31 |
label="Number of Speakers",
|
32 |
-
value=
|
33 |
speaker_names = gr.Dataframe(
|
34 |
label="Type your names and details. Your actual entries will be limited to the speakers you selected above.",
|
35 |
headers=["Name", "Supporting Details"],
|
@@ -38,15 +39,20 @@ def main(conf):
|
|
38 |
col_count=(2, "fixed"),
|
39 |
)
|
40 |
|
41 |
-
|
42 |
process_button = gr.Button("Process")
|
|
|
|
|
|
|
43 |
diarization_output = gr.Textbox(label="Diarization Output")
|
44 |
label_file_link = gr.File(label="Download DAW Labels")
|
|
|
|
|
|
|
45 |
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
)
|
51 |
|
52 |
demo.launch(server_name="0.0.0.0", allowed_paths=["/"])
|
|
|
19 |
|
20 |
with gr.TabItem(conf["layout"]["page_names"][0]):
|
21 |
|
22 |
+
gr.Markdown("# π€ Non-Video Meeting Transcription and Speaker Diarization")
|
23 |
gr.Markdown("![](file/microphone_pen_and_paper.png)")
|
24 |
gr.Markdown(get_files.load_markdown_file(conf["layout"]["about"]))
|
25 |
|
26 |
|
27 |
with gr.TabItem(conf["layout"]["page_names"][1]):
|
28 |
+
gr.Markdown("# π Upload or Record your meeting")
|
29 |
audio_input = gr.Audio(type="filepath", label="Upload Audio File")
|
30 |
+
num_speakers = gr.Dropdown(list(range(conf["session"]["min_speakers"],
|
31 |
+
conf["session"]["max_sessions"])),
|
32 |
label="Number of Speakers",
|
33 |
+
value=conf["session"]["min_speakers"])
|
34 |
speaker_names = gr.Dataframe(
|
35 |
label="Type your names and details. Your actual entries will be limited to the speakers you selected above.",
|
36 |
headers=["Name", "Supporting Details"],
|
|
|
39 |
col_count=(2, "fixed"),
|
40 |
)
|
41 |
|
|
|
42 |
process_button = gr.Button("Process")
|
43 |
+
|
44 |
+
|
45 |
+
with gr.TabItem(conf["layout"]["page_names"][1]):
|
46 |
diarization_output = gr.Textbox(label="Diarization Output")
|
47 |
label_file_link = gr.File(label="Download DAW Labels")
|
48 |
+
|
49 |
+
|
50 |
+
# Process
|
51 |
|
52 |
+
process_button.click(
|
53 |
+
fn=process_meeting,
|
54 |
+
inputs=[audio_input, num_speakers, speaker_names],
|
55 |
+
outputs=[diarization_output, label_file_link]
|
56 |
)
|
57 |
|
58 |
demo.launch(server_name="0.0.0.0", allowed_paths=["/"])
|