FranklinWillemen commited on
Commit
b51ffc6
1 Parent(s): 1b7a6e4

Add transcript and changes ui

Browse files
Files changed (2) hide show
  1. context.txt +0 -0
  2. gradio-ui.py +10 -11
context.txt DELETED
File without changes
gradio-ui.py CHANGED
@@ -7,18 +7,17 @@ theme = gr.themes.Default().set(
7
  )
8
 
9
  with gr.Blocks(theme=theme) as ui:
10
- # advisor image input and microphone input
11
- # advisor = gr.Image(value=config.TARS_LOGO).style(width=config.LOGO_IMAGE_WIDTH, height=config.LOGO_IMAGE_HEIGHT)
12
- message = gr.Audio(source="microphone", type="filepath")
13
- audio_response = gr.Audio()
 
 
 
 
 
14
 
15
- # text transcript output and audio
16
- # text_output = gr.Textbox(label="Transcript")
17
-
18
- btn1 = gr.Button("Respond")
19
- btn1.click(fn=d.respond, inputs=message, outputs=[audio_response])
20
-
21
- btn2 = gr.Button("Save Conversation")
22
  btn2.click(fn=d.memory)
23
 
24
  ui.launch()
 
7
  )
8
 
9
  with gr.Blocks(theme=theme) as ui:
10
+ with gr.Row():
11
+ with gr.Column(scale=1):
12
+ message = gr.Audio(source="microphone", type="filepath")
13
+ btn1 = gr.Button("Respond")
14
+ with gr.Column(scale=1):
15
+ audio_response = gr.Audio()
16
+ with gr.Row():
17
+ text_response = gr.Textbox(label="Transcript", max_lines=10)
18
+ btn2 = gr.Button("Save Conversation")
19
 
20
+ btn1.click(fn=d.respond, inputs=message, outputs=[audio_response, text_response])
 
 
 
 
 
 
21
  btn2.click(fn=d.memory)
22
 
23
  ui.launch()