foreversheikh commited on
Commit
d774eb3
Β·
verified Β·
1 Parent(s): 99d1a27

Update src/streamlit_app.py

Browse files
Files changed (1) hide show
  1. src/streamlit_app.py +15 -0
src/streamlit_app.py CHANGED
@@ -17,6 +17,21 @@ import plotly.express as px
17
 
18
  warnings.simplefilter(action='ignore', category=FutureWarning)
19
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
20
  # ───────────────────────────────────────────────────────────────────────
21
  # Page config & custom CSS
22
  # ───────────────────────────────────────────────────────────────────────
 
17
 
18
  warnings.simplefilter(action='ignore', category=FutureWarning)
19
 
20
+ # ───────────────────────────────────────────────────────────────────────
21
+ # JAX compatibility patch for ColabDesign (older versions expect
22
+ # jax.lib.xla_bridge which was removed in newer JAX releases)
23
+ # ───────────────────────────────────────────────────────────────────────
24
+ try:
25
+ import jax
26
+ if not hasattr(jax, 'lib') or not hasattr(jax.lib, 'xla_bridge'):
27
+ import types
28
+ import jax._src.xla_bridge as _xb
29
+ if not hasattr(jax, 'lib'):
30
+ jax.lib = types.ModuleType('jax.lib')
31
+ jax.lib.xla_bridge = _xb
32
+ except Exception:
33
+ pass
34
+
35
  # ───────────────────────────────────────────────────────────────────────
36
  # Page config & custom CSS
37
  # ───────────────────────────────────────────────────────────────────────