JaweriaGenAI commited on
Commit
0f9ce1a
Β·
verified Β·
1 Parent(s): a800e29

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -5
app.py CHANGED
@@ -126,16 +126,14 @@ textarea, input[type='text'] { background: #f0f0f0; border-radius: 8px; }
126
 
127
  gr.Markdown("# πŸ€– Neobot - Always Listening", elem_id="title")
128
 
129
- chatbot = gr.Chatbot(type="messages")
130
-
131
 
132
  with gr.Row():
133
  chat_input = gr.Textbox(placeholder="Type here or use mic...", scale=6, show_label=False)
134
  send_btn = gr.Button("πŸš€", scale=1)
135
 
136
  with gr.Row():
137
- mic_audio = gr.Audio(label="πŸŽ™οΈ Record Voice", format="wav", interactive=True)
138
-
139
  mic_audio.change(transcribe_audio, [mic_audio], [chat_input])
140
 
141
  with gr.Row():
@@ -160,4 +158,4 @@ textarea, input[type='text'] { background: #f0f0f0; border-radius: 8px; }
160
  save_btn.click(lambda: gr.update(choices=list_saved_files()), [], [dropdown])
161
  load_btn.click(load_chat, [dropdown], [chatbot, state, status])
162
 
163
- demo.launch()
 
126
 
127
  gr.Markdown("# πŸ€– Neobot - Always Listening", elem_id="title")
128
 
129
+ chatbot = gr.Chatbot()
 
130
 
131
  with gr.Row():
132
  chat_input = gr.Textbox(placeholder="Type here or use mic...", scale=6, show_label=False)
133
  send_btn = gr.Button("πŸš€", scale=1)
134
 
135
  with gr.Row():
136
+ mic_audio = gr.Audio(source="microphone", type="filepath", label="πŸŽ™οΈ Record Voice")
 
137
  mic_audio.change(transcribe_audio, [mic_audio], [chat_input])
138
 
139
  with gr.Row():
 
158
  save_btn.click(lambda: gr.update(choices=list_saved_files()), [], [dropdown])
159
  load_btn.click(load_chat, [dropdown], [chatbot, state, status])
160
 
161
+ demo.launch()