Kashaf10 commited on
Commit
cce6bd1
·
verified ·
1 Parent(s): 94d3bf7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -0
app.py CHANGED
@@ -25,6 +25,18 @@ import tempfile
25
  import gradio as gr
26
  import httpx
27
 
 
 
 
 
 
 
 
 
 
 
 
 
28
  # --------------------------------------------------------------------------- #
29
  # Config
30
  # --------------------------------------------------------------------------- #
 
25
  import gradio as gr
26
  import httpx
27
 
28
+ # Hugging Face ZeroGPU Spaces insist on at least one @spaces.GPU function at startup.
29
+ # This app never uses a GPU; this placeholder only satisfies that check and is
30
+ # silently skipped everywhere else (Colab, CPU Spaces).
31
+ try:
32
+ import spaces
33
+
34
+ @spaces.GPU
35
+ def _zero_gpu_placeholder():
36
+ return None
37
+ except Exception:
38
+ pass
39
+
40
  # --------------------------------------------------------------------------- #
41
  # Config
42
  # --------------------------------------------------------------------------- #