sudo-soldier commited on
Commit
8bb4b3f
·
verified ·
1 Parent(s): 68748a7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -7
app.py CHANGED
@@ -83,7 +83,7 @@ def generate_rom_page(rom_name):
83
 
84
  # Gradio App
85
  def gradio_app():
86
- with gr.Blocks() as app:
87
  gr.Markdown("# 🎮 Retro ROM File Server")
88
 
89
  # List available ROMs and create a button for each
@@ -91,12 +91,8 @@ def gradio_app():
91
 
92
  # Display the available ROM files
93
  with gr.Column():
94
- # Create dropdown with a custom CSS for scrollable effect
95
- rom_buttons = gr.Dropdown(choices=rom_files, label="Select a ROM to Play", interactive=True)
96
-
97
- # Add custom CSS for the dropdown to make it scrollable
98
- rom_buttons.style(container=True)
99
- rom_buttons.elem.style.update({"max-height": "400px", "overflow-y": "auto"})
100
 
101
  output_html = gr.HTML(value="Please select a ROM to play.")
102
 
@@ -124,3 +120,4 @@ gradio_app()
124
 
125
 
126
 
 
 
83
 
84
  # Gradio App
85
  def gradio_app():
86
+ with gr.Blocks(css=".gradio-dropdown { max-height: 400px; overflow-y: auto; }") as app:
87
  gr.Markdown("# 🎮 Retro ROM File Server")
88
 
89
  # List available ROMs and create a button for each
 
91
 
92
  # Display the available ROM files
93
  with gr.Column():
94
+ # Create dropdown with a custom CSS class
95
+ rom_buttons = gr.Dropdown(choices=rom_files, label="Select a ROM to Play", interactive=True, elem_id="rom-dropdown")
 
 
 
 
96
 
97
  output_html = gr.HTML(value="Please select a ROM to play.")
98
 
 
120
 
121
 
122
 
123
+