Rammohan0504 commited on
Commit
c0a8745
·
verified ·
1 Parent(s): 924fc2c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -4
app.py CHANGED
@@ -44,13 +44,14 @@ with gr.Blocks() as demo:
44
  # Microphone icon to prompt users to speak
45
  gr.HTML(f"""
46
  <div style="text-align: center;">
47
- <img src="/mnt/data/Screenshot 2024-12-28 101858.jpg" alt="Microphone"
48
- style="cursor: pointer; width: 50px; height: 50px;"
49
- onclick="document.getElementById('audio-input').click()">
 
50
  <p>Click the microphone to speak</p>
51
  </div>
52
  """)
53
- mic_input = gr.Audio(id="audio-input", type="filepath", label="Record Your Query")
54
  response_output = gr.Audio(type="filepath", label="Response")
55
 
56
  # Link the audio input to the voice assistant function
 
44
  # Microphone icon to prompt users to speak
45
  gr.HTML(f"""
46
  <div style="text-align: center;">
47
+ <label for="audio-upload">
48
+ <img src="/mnt/data/Screenshot 2024-12-28 101858.jpg" alt="Microphone"
49
+ style="cursor: pointer; width: 50px; height: 50px;">
50
+ </label>
51
  <p>Click the microphone to speak</p>
52
  </div>
53
  """)
54
+ mic_input = gr.Audio(type="filepath", label="Record Your Query", visible=False)
55
  response_output = gr.Audio(type="filepath", label="Response")
56
 
57
  # Link the audio input to the voice assistant function