Wajahat698 commited on
Commit
0a41579
·
verified ·
1 Parent(s): cadbf74

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -28
app.py CHANGED
@@ -1993,34 +1993,9 @@ with gr.Blocks(js=js_func) as demo:
1993
  with gr.Row():
1994
 
1995
  # Define buttons with specific elem_id for targeting
1996
- vw_customers_btn = gr.Button("VW Owners", elem_id="component-9")
1997
- vw_prospects_btn = gr.Button("VW Prospects", elem_id="component-10")
1998
- demo.load(
1999
- _js="""
2000
- () => {
2001
- // Function to handle button clicks
2002
- const buttons = document.querySelectorAll('#component-8 button');
2003
- buttons.forEach(button => {
2004
- button.addEventListener('click', () => {
2005
- // Remove highlight from all buttons
2006
- buttons.forEach(btn => btn.classList.remove('highlight'));
2007
- // Add highlight to the clicked button
2008
- button.classList.add('highlight');
2009
- });
2010
- });
2011
- }
2012
- """
2013
- )
2014
- css = """
2015
- <style>
2016
- .highlight {
2017
- background-color: yellow; /* Highlight color */
2018
- border: 2px solid black; /* Optional for emphasis */
2019
- }
2020
- </style>
2021
- """
2022
- demo.append(css)
2023
-
2024
 
2025
 
2026
 
 
1993
  with gr.Row():
1994
 
1995
  # Define buttons with specific elem_id for targeting
1996
+ vw_customers_btn = gr.Button("VW Owners")
1997
+ vw_prospects_btn = gr.Button("VW Prospects")
1998
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1999
 
2000
 
2001