hmb HF Staff Claude Opus 4.6 (1M context) commited on
Commit
2191d21
Β·
1 Parent(s): 511a902

Import spaces before tribev2 to avoid CUDA init order error

Browse files

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -1,9 +1,3 @@
1
- import gradio as gr
2
- import numpy as np
3
- import plotly.graph_objects as go
4
- import threading
5
- from tribev2 import TribeModel
6
-
7
  try:
8
  import spaces
9
  except ImportError:
@@ -13,6 +7,12 @@ except ImportError:
13
  return dec
14
  spaces = _Placeholder()
15
 
 
 
 
 
 
 
16
  # ── Load model (thread-safe, lazy) ──────────────────────────────────────────
17
 
18
  _model = None
 
 
 
 
 
 
 
1
  try:
2
  import spaces
3
  except ImportError:
 
7
  return dec
8
  spaces = _Placeholder()
9
 
10
+ import gradio as gr
11
+ import numpy as np
12
+ import plotly.graph_objects as go
13
+ import threading
14
+ from tribev2 import TribeModel
15
+
16
  # ── Load model (thread-safe, lazy) ──────────────────────────────────────────
17
 
18
  _model = None