Kyle Pearson commited on
Commit
57a52e9
·
1 Parent(s): df6e003

Add graceful error handling fallback for missing `spaces` module

Browse files
Files changed (1) hide show
  1. app.py +5 -0
app.py CHANGED
@@ -10,6 +10,11 @@ This application allows you to:
10
  Author: Qwen Code Assistant
11
  """
12
 
 
 
 
 
 
13
  import gradio as gr
14
 
15
 
 
10
  Author: Qwen Code Assistant
11
  """
12
 
13
+ try:
14
+ import spaces # noqa: F401 — must be imported before torch/CUDA packages
15
+ except ImportError:
16
+ pass
17
+
18
  import gradio as gr
19
 
20