Customers commited on
Commit
99d29ff
·
verified ·
1 Parent(s): f730393

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +27 -3
app.py CHANGED
@@ -2874,6 +2874,30 @@ button:active {
2874
  display: none !important;
2875
  }
2876
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2877
  """
2878
 
2879
  def respond(message, history, max_tokens, temperature, top_p):
@@ -3295,14 +3319,14 @@ with gr.Blocks(
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>
@@ -3319,7 +3343,7 @@ with gr.Blocks(
3319
  });
3320
 
3321
  micIcon.addEventListener('click', () => {
3322
- alert('Connecting to GPU... This feature is coming soon!');
3323
  });
3324
  </script>
3325
  """)
 
2874
  display: none !important;
2875
  }
2876
 
2877
+ /* Microphone icon styling */
2878
+ #mic-icon {
2879
+ transition: all 0.3s ease;
2880
+ opacity: 0.7;
2881
+ }
2882
+
2883
+ #mic-icon:hover {
2884
+ transform: scale(1.1);
2885
+ opacity: 1;
2886
+ stroke: #00FF00; /* Change to lime green on hover */
2887
+ }
2888
+
2889
+ /* Tooltip arrow */
2890
+ #mic-tooltip:after {
2891
+ content: "";
2892
+ position: absolute;
2893
+ top: 100%;
2894
+ left: 50%;
2895
+ margin-left: -5px;
2896
+ border-width: 5px;
2897
+ border-style: solid;
2898
+ border-color: #333 transparent transparent transparent;
2899
+ }
2900
+
2901
  """
2902
 
2903
  def respond(message, history, max_tokens, temperature, top_p):
 
3319
  mic_icon = gr.HTML("""
3320
  <div style="display: flex; align-items: center; margin-left: 5px;">
3321
  <div style="position: relative; display: inline-block;">
3322
+ <svg id="mic-icon" xmlns="https://i.imgur.com/uwWn31l.png" 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;">
3323
  <path d="M12 1a3 3 0 0 0-3 3v8a3 3 0 0 0 6 0V4a3 3 0 0 0-3-3z"></path>
3324
  <path d="M19 10v2a7 7 0 0 1-14 0v-2"></path>
3325
  <line x1="12" y1="19" x2="12" y2="23"></line>
3326
  <line x1="8" y1="23" x2="16" y2="23"></line>
3327
  </svg>
3328
  <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;">
3329
+ Connect to Local GPU
3330
  </div>
3331
  </div>
3332
  </div>
 
3343
  });
3344
 
3345
  micIcon.addEventListener('click', () => {
3346
+ alert('Contact GossApp to connect Local GPU!');
3347
  });
3348
  </script>
3349
  """)