RuslanKain commited on
Commit
fdfd4e1
·
1 Parent(s): 5378b38

add app file

Browse files
Files changed (1) hide show
  1. app.py +13 -4
app.py CHANGED
@@ -339,10 +339,19 @@ def create_app():
339
  """
340
 
341
  # Create the app container
342
- with gr.Blocks(
343
- title="CISC 121 Gesture App", # Browser tab title
344
- theme=gr.themes.Soft() # A nice, modern look
345
- ) as app:
 
 
 
 
 
 
 
 
 
346
 
347
  # ----------------------------------------------------------------------
348
  # PART A: HEADER SECTION
 
339
  """
340
 
341
  # Create the app container
342
+ # Note: We use try/except for theme to support different Gradio versions
343
+ # Older versions don't support the theme parameter the same way
344
+ try:
345
+ # Try modern Gradio syntax (4.x+)
346
+ app = gr.Blocks(
347
+ title="CISC 121 Gesture App", # Browser tab title
348
+ theme=gr.themes.Soft() # A nice, modern look
349
+ )
350
+ except TypeError:
351
+ # Fall back for older Gradio versions
352
+ app = gr.Blocks(title="CISC 121 Gesture App")
353
+
354
+ with app:
355
 
356
  # ----------------------------------------------------------------------
357
  # PART A: HEADER SECTION