bhupesh-sf commited on
Commit
1dd8aa5
·
verified ·
1 Parent(s): be73da5

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -1
app.py CHANGED
@@ -12,10 +12,20 @@ import sys
12
  sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
13
 
14
  # Import and run the main application
15
- from ui.app import create_app, main
 
16
 
17
  if __name__ == "__main__":
18
  main()
19
  else:
20
  # For Gradio Spaces, create the app object
21
  demo = create_app()
 
 
 
 
 
 
 
 
 
 
12
  sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
13
 
14
  # Import and run the main application
15
+ from ui.app import create_app, main, load_custom_css, CRITICAL_HEAD_CSS
16
+ from ui.themes.fantasy_theme import fantasy_theme
17
 
18
  if __name__ == "__main__":
19
  main()
20
  else:
21
  # For Gradio Spaces, create the app object
22
  demo = create_app()
23
+
24
+ # Gradio 6: Load custom CSS
25
+ custom_css = load_custom_css()
26
+
27
+ # Set CSS, theme, and head directly on the app (for Gradio 6 compatibility)
28
+ if custom_css:
29
+ demo.css = custom_css
30
+ demo.theme = fantasy_theme
31
+ demo.head = CRITICAL_HEAD_CSS