chrisvoncsefalvay commited on
Commit
ddb47d4
·
1 Parent(s): 06a3065

Remove problematic JavaScript code

Browse files

- Removed unnecessary question_js JavaScript code
- Removed DOMContentLoaded event listener causing errors
- Cleaned up js parameter from gr.Blocks initialization
- Native Gradio buttons handle all interactions now

Files changed (1) hide show
  1. app.py +1 -19
app.py CHANGED
@@ -649,26 +649,8 @@ custom_css = """
649
  }
650
  """
651
 
652
- # JavaScript for question button functionality
653
- question_js = """
654
- function setupQuestionButtons() {
655
- document.addEventListener('click', function(e) {
656
- if (e.target.classList.contains('question-button')) {
657
- const question = e.target.textContent;
658
- const textbox = document.querySelector('textarea[placeholder*="Ask about dental"]');
659
- if (textbox) {
660
- textbox.value = question;
661
- textbox.dispatchEvent(new Event('input', { bubbles: true }));
662
- }
663
- }
664
- });
665
- }
666
-
667
- document.addEventListener('DOMContentLoaded', setupQuestionButtons);
668
- """
669
-
670
  # Create the Gradio interface
671
- with gr.Blocks(theme=gr.themes.Soft(), css=custom_css, js=question_js) as demo:
672
 
673
  # Header with credits and social links
674
  gr.HTML(
 
649
  }
650
  """
651
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
652
  # Create the Gradio interface
653
+ with gr.Blocks(theme=gr.themes.Soft(), css=custom_css) as demo:
654
 
655
  # Header with credits and social links
656
  gr.HTML(