Customers commited on
Commit
f730393
·
verified ·
1 Parent(s): 34fb055

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +34 -3
app.py CHANGED
@@ -3290,11 +3290,42 @@ with gr.Blocks(
3290
  scale=6
3291
  )
3292
  submit = gr.Button("", elem_classes="send-btn")
3293
-
3294
-
3295
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3296
  # Keep the actual clear button but hide it
3297
- clear = gr.ClearButton([msg, chatbot], variant="secondary")
3298
 
3299
  # Add Business, Family, Friends chatbots right below the button row
3300
  business_html_display = gr.HTML(f"""
 
3290
  scale=6
3291
  )
3292
  submit = gr.Button("", elem_classes="send-btn")
 
 
3293
 
3294
+ # Add microphone icon with hover tooltip
3295
+ mic_icon = gr.HTML("""
3296
+ <div style="display: flex; align-items: center; margin-left: 5px;">
3297
+ <div style="position: relative; display: inline-block;">
3298
+ <svg id="mic-icon" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#333" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" style="cursor: pointer;">
3299
+ <path d="M12 1a3 3 0 0 0-3 3v8a3 3 0 0 0 6 0V4a3 3 0 0 0-3-3z"></path>
3300
+ <path d="M19 10v2a7 7 0 0 1-14 0v-2"></path>
3301
+ <line x1="12" y1="19" x2="12" y2="23"></line>
3302
+ <line x1="8" y1="23" x2="16" y2="23"></line>
3303
+ </svg>
3304
+ <div id="mic-tooltip" style="position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); background: #333; color: white; padding: 5px 10px; border-radius: 4px; font-size: 12px; white-space: nowrap; display: none; margin-bottom: 5px;">
3305
+ Connect to GPU
3306
+ </div>
3307
+ </div>
3308
+ </div>
3309
+ <script>
3310
+ const micIcon = document.getElementById('mic-icon');
3311
+ const tooltip = document.getElementById('mic-tooltip');
3312
+
3313
+ micIcon.addEventListener('mouseenter', () => {
3314
+ tooltip.style.display = 'block';
3315
+ });
3316
+
3317
+ micIcon.addEventListener('mouseleave', () => {
3318
+ tooltip.style.display = 'none';
3319
+ });
3320
+
3321
+ micIcon.addEventListener('click', () => {
3322
+ alert('Connecting to GPU... This feature is coming soon!');
3323
+ });
3324
+ </script>
3325
+ """)
3326
+
3327
  # Keep the actual clear button but hide it
3328
+
3329
 
3330
  # Add Business, Family, Friends chatbots right below the button row
3331
  business_html_display = gr.HTML(f"""