nailarais1 commited on
Commit
c141650
·
verified ·
1 Parent(s): f3f6288

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -4
app.py CHANGED
@@ -689,21 +689,30 @@ class ProductionVoiceBridge:
689
  def create_production_interface(allow_microphone: bool = False):
690
  """Create production-ready Gradio interface"""
691
 
692
- # Initialize the system; allow microphone only if requested
 
 
 
693
  voice_bridge = ProductionVoiceBridge(allow_microphone=allow_microphone)
694
 
695
- # Minimal custom CSS for accessibility (kept from your original)
696
- custom_css = """
697
  :root { --primary-color: #2563eb; --danger-color: #dc2626; }
698
  .accessible-btn { min-height:48px !important; padding:12px 18px !important; font-size:16px !important; }
699
  .emergency-btn { background: linear-gradient(45deg,#dc2626,#ef4444) !important; color:white !important; font-weight:bold !important; }
700
  .large-text { font-size:18px !important; }
701
  """
702
 
 
 
 
 
703
  with gr.Blocks(theme=gr.themes.Soft(primary_hue="blue")) as demo:
704
- gr.HTML(f"<style>{custom_css}</style>")
705
 
 
 
706
 
 
707
  gr.Markdown("# 🎯 VoiceBridge AI - Universal Communication Platform")
708
 
709
  # Status row
 
689
  def create_production_interface(allow_microphone: bool = False):
690
  """Create production-ready Gradio interface"""
691
 
692
+ # Load your external CSS (if used)
693
+ custom_css = get_custom_css()
694
+
695
+ # Initialize the system; microphone allowed only if specified
696
  voice_bridge = ProductionVoiceBridge(allow_microphone=allow_microphone)
697
 
698
+ # Additional accessibility CSS
699
+ accessibility_css = """
700
  :root { --primary-color: #2563eb; --danger-color: #dc2626; }
701
  .accessible-btn { min-height:48px !important; padding:12px 18px !important; font-size:16px !important; }
702
  .emergency-btn { background: linear-gradient(45deg,#dc2626,#ef4444) !important; color:white !important; font-weight:bold !important; }
703
  .large-text { font-size:18px !important; }
704
  """
705
 
706
+ # Combine both CSS blocks
707
+ final_css = custom_css + "\n" + accessibility_css
708
+
709
+ # Gradio 4.x → NO css= allowed
710
  with gr.Blocks(theme=gr.themes.Soft(primary_hue="blue")) as demo:
 
711
 
712
+ # Inject CSS manually (correct for Gradio 4.x)
713
+ gr.HTML(f"<style>{final_css}</style>")
714
 
715
+ # Your header
716
  gr.Markdown("# 🎯 VoiceBridge AI - Universal Communication Platform")
717
 
718
  # Status row