MegaTronX commited on
Commit
19e4851
·
verified ·
1 Parent(s): 722177d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -1
app.py CHANGED
@@ -1,3 +1,9 @@
1
  import gradio as gr
2
 
3
- gr.load("models/infly/OpenCoder-8B-Instruct").launch()
 
 
 
 
 
 
 
1
  import gradio as gr
2
 
3
+ if torch.cuda.is_available() or os.getenv("ZERO_GPU_SUPPORT", False):
4
+ gr.load("models/infly/OpenCoder-8B-Instruct").launch()
5
+ else:
6
+ raise RuntimeError("No compatible GPU environment found for this model.")
7
+
8
+ #@spaces.GPU
9
+