tykiww commited on
Commit
4631e13
·
verified ·
1 Parent(s): 675d7b7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -7
app.py CHANGED
@@ -4,7 +4,7 @@ from utilities.setup import get_files
4
 
5
 
6
  #@spaces.GPU
7
- def process_meeting(audio_input, num_speakers, name_input, supporting_details):
8
  if 1 < num_speakers < 6:
9
  answer = "Completed Loading Data", "fl"
10
  else:
@@ -27,15 +27,17 @@ def main(conf):
27
 
28
  audio_input = gr.Audio(type="filepath", label="Upload Audio File")
29
  num_speakers = gr.Number(label="Number of Speakers",
30
- info="Please include ",
31
  value=2,
32
  precision=0,
33
  minimum=2,
34
  maximum=5)
35
- with gr.Row():
36
- print(num_speakers.value)
37
- name_input = gr.Textbox(label="Speaker name")
38
- support_details = gr.Textbox(label="Speaker Details")
 
 
 
39
 
40
  process_button = gr.Button("Process")
41
  diarization_output = gr.Textbox(label="Diarization Output")
@@ -43,7 +45,7 @@ def main(conf):
43
 
44
  process_button.click(
45
  fn=process_meeting,
46
- inputs=[audio_input, num_speakers, name_input, support_details],
47
  outputs=[diarization_output, label_file_link]
48
  )
49
 
 
4
 
5
 
6
  #@spaces.GPU
7
+ def process_meeting(audio_input, num_speakers, speaker_names):
8
  if 1 < num_speakers < 6:
9
  answer = "Completed Loading Data", "fl"
10
  else:
 
27
 
28
  audio_input = gr.Audio(type="filepath", label="Upload Audio File")
29
  num_speakers = gr.Number(label="Number of Speakers",
 
30
  value=2,
31
  precision=0,
32
  minimum=2,
33
  maximum=5)
34
+ speaker_names = gr.Dataframe(
35
+ label="Names and Additional Info",
36
+ headers=["Name", "Supporting Details"],
37
+ datatype=["str", "str"],
38
+ row_count=(5,"dynamic"),
39
+ col_count=(2, "fixed"),
40
+ ),
41
 
42
  process_button = gr.Button("Process")
43
  diarization_output = gr.Textbox(label="Diarization Output")
 
45
 
46
  process_button.click(
47
  fn=process_meeting,
48
+ inputs=[audio_input, num_speakers, speaker_names],
49
  outputs=[diarization_output, label_file_link]
50
  )
51