DawnC commited on
Commit
a3f68be
·
verified ·
1 Parent(s): b323ef8

Update ui_manager.py

Browse files
Files changed (1) hide show
  1. ui_manager.py +5 -9
ui_manager.py CHANGED
@@ -263,14 +263,9 @@ class UIManager:
263
  self._gradio_version = gr.__version__
264
  self._gradio_major = int(self._gradio_version.split('.')[0])
265
 
266
- # Compatible with both Gradio 4.x and 5.x
267
- # Note: css parameter support varies, so we inject CSS via HTML instead
268
- blocks_kwargs = {
269
- "title": "SceneWeaver - AI Background Generator",
270
- "theme": gr.themes.Soft()
271
- }
272
-
273
- with gr.Blocks(**blocks_kwargs) as interface:
274
 
275
  # Inject CSS (compatible with all Gradio versions)
276
  gr.HTML(f"<style>{self._css}</style>")
@@ -536,7 +531,8 @@ class UIManager:
536
  """Launch the UI interface"""
537
  interface = self.create_interface()
538
 
539
- # Launch kwargs compatible with both Gradio 4.x and 5.x
 
540
  launch_kwargs = {
541
  "share": share,
542
  "debug": debug,
 
263
  self._gradio_version = gr.__version__
264
  self._gradio_major = int(self._gradio_version.split('.')[0])
265
 
266
+ # Compatible with Gradio 4.44.0+
267
+ # Use minimal constructor arguments for maximum compatibility
268
+ with gr.Blocks() as interface:
 
 
 
 
 
269
 
270
  # Inject CSS (compatible with all Gradio versions)
271
  gr.HTML(f"<style>{self._css}</style>")
 
531
  """Launch the UI interface"""
532
  interface = self.create_interface()
533
 
534
+ # Launch kwargs compatible with Gradio 4.44.0+
535
+ # Keep minimal for maximum compatibility
536
  launch_kwargs = {
537
  "share": share,
538
  "debug": debug,